From a17e58647f2cdbc83f1b4fdaa197d7cd448c2adf Mon Sep 17 00:00:00 2001 From: purple-force <1017704437@qq.com> Date: Thu, 4 Jul 2019 16:36:28 +0800 Subject: [PATCH] fix(Badge): change count to -1 error, close #845 --- src/badge/sup.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/badge/sup.jsx b/src/badge/sup.jsx index fa0e3e29ea..d5e52f2368 100644 --- a/src/badge/sup.jsx +++ b/src/badge/sup.jsx @@ -86,6 +86,9 @@ export default class Sup extends Component { computeStyle(removeTransition, revert) { const { prefix, count, overflowCount } = this.props; + if (count < 0) { + return; + } const supNode = this.refs.sup; if (supNode && dom.hasClass(supNode, `${prefix}badge-count`)) {