Skip to content

Commit 0f448b8

Browse files
committed
Fix IE directive not compiled issue
In the TodoMVC example, when `v-show` is compiled first, it adds an inline style attribute to the node. Since IE seems to handle the order of attributes in `node.attributes` differently from other browsers, this causes some directives to be skipped and never compiled. Simply copy the attribtues into an Array before compiling solves the issue.
1 parent 6673828 commit 0f448b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ CompilerProto.compile = function (node, root) {
326326
*/
327327
CompilerProto.compileNode = function (node) {
328328
var i, j,
329-
attrs = node.attributes,
329+
attrs = slice.call(node.attributes),
330330
prefix = config.prefix + '-'
331331
// parse if has attributes
332332
if (attrs && attrs.length) {

0 commit comments

Comments
 (0)