From cb1549e94addd14464a7ab68e450d380650282ec Mon Sep 17 00:00:00 2001 From: RubyLouvre Date: Wed, 19 Nov 2014 15:20:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20addClass=E6=B2=A1=E6=9C=89=E8=BF=9B?= =?UTF-8?q?=E8=A1=8Ctrim=E6=93=8D=E4=BD=9C=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avalon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avalon.js b/avalon.js index 5bf54df7b..d814a545e 100644 --- a/avalon.js +++ b/avalon.js @@ -1122,9 +1122,10 @@ } }, _remove: function(cls) { - this._set((" " + this + " ").replace(" " + cls + " ", " ").trim()) + this._set((" " + this + " ").replace(" " + cls + " ", " ")) }, __set: function(cls) { + cls = cls.trim() var node = this.node if (typeof node.className === "string") { node.className = cls