Skip to content

Commit 2aa7f4d

Browse files
committed
fix(uiSref): use Object's toString instead of Window's toString
Fix 'Invalid Calling Object' error in IE11
1 parent 2fff59c commit 2aa7f4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stateDirectives.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function $StateRefDirective($state, $timeout) {
8787
var ref = parseStateRef(attrs.uiSref, $state.current.name);
8888
var params = null, url = null, base = stateContext(element) || $state.$current;
8989
// SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
90-
var hrefKind = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
90+
var hrefKind = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
9191
'xlink:href' : 'href';
9292
var newHref = null, isAnchor = element.prop("tagName").toUpperCase() === "A";
9393
var isForm = element[0].nodeName === "FORM";

0 commit comments

Comments
 (0)