Skip to content

Commit

Permalink
Fix IE directive not compiled issue
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yyx990803 committed Feb 9, 2014
1 parent 6673828 commit 0f448b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ CompilerProto.compile = function (node, root) {
*/
CompilerProto.compileNode = function (node) {
var i, j,
attrs = node.attributes,
attrs = slice.call(node.attributes),
prefix = config.prefix + '-'
// parse if has attributes
if (attrs && attrs.length) {
Expand Down

0 comments on commit 0f448b8

Please sign in to comment.