Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e407cde

Browse files
author
Michel Boudreau
committed
Fixes ng-jq bug #11016 using getNgAttribute to get prefix attribute which relies on jqLite variable that isn't set yet.
1 parent 850c604 commit e407cde

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Angular.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,16 +943,17 @@ var csp = function() {
943943
var jq = function() {
944944
if (isDefined(jq.name_)) return jq.name_;
945945
var el;
946-
var i, ii = ngAttrPrefixes.length;
946+
var i, ii = ngAttrPrefixes.length, prefix;
947947
for (i = 0; i < ii; ++i) {
948-
if (el = document.querySelector('[' + ngAttrPrefixes[i].replace(':', '\\:') + 'jq]')) {
948+
prefix = ngAttrPrefixes[i];
949+
if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) {
949950
break;
950951
}
951952
}
952953

953954
var name;
954955
if (el) {
955-
name = getNgAttribute(el, "jq");
956+
name = el.getAttribute(prefix + 'jq');
956957
}
957958

958959
return (jq.name_ = name);

0 commit comments

Comments
 (0)