Skip to content

Commit db5f9c8

Browse files
committed
fix bind attr removal in IE10
1 parent a9eead1 commit db5f9c8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/directive.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,14 @@ Directive.prototype._teardown = function () {
301301
*/
302302

303303
function removeBindAttr (el, name) {
304-
var attr = el.hasAttribute(':' + name)
305-
? ':' + name
306-
: config.prefix + 'bind:' + name
307-
el.removeAttribute(attr)
304+
var attr = ':' + name
305+
if (el.hasAttribute(attr)) {
306+
el.removeAttribute(attr)
307+
}
308+
attr = config.prefix + 'bind:' + name
309+
if (el.hasAttribute(attr)) {
310+
el.removeAttribute(attr)
311+
}
308312
}
309313

310314
module.exports = Directive

0 commit comments

Comments
 (0)