diff --git a/src/platforms/web/runtime/class-util.js b/src/platforms/web/runtime/class-util.js index 80d866d73a8..a33449af3e0 100644 --- a/src/platforms/web/runtime/class-util.js +++ b/src/platforms/web/runtime/class-util.js @@ -6,7 +6,7 @@ */ export function addClass (el: Element, cls: ?string) { /* istanbul ignore if */ - if (!cls || !cls.trim()) { + if (!cls || !(cls = cls.trim())) { return } @@ -31,7 +31,7 @@ export function addClass (el: Element, cls: ?string) { */ export function removeClass (el: Element, cls: ?string) { /* istanbul ignore if */ - if (!cls || !cls.trim()) { + if (!cls || !(cls = cls.trim())) { return } diff --git a/test/unit/features/transition/transition.spec.js b/test/unit/features/transition/transition.spec.js index 22fa39d8a3f..7d65eeacefa 100644 --- a/test/unit/features/transition/transition.spec.js +++ b/test/unit/features/transition/transition.spec.js @@ -73,7 +73,7 @@ if (!isIE9) { enter-to-class="hello-to" leave-class="bye" leave-to-class="bye-to" - leave-active-class="byebye active"> + leave-active-class="byebye active more ">