Skip to content

Commit

Permalink
Mimic Array#find to work on IE
Browse files Browse the repository at this point in the history
  • Loading branch information
garryyao committed Nov 11, 2016
1 parent 6693337 commit da0a6b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion px-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 137,15 @@
},

_isElementRegistered: function(elementId) {
return !!Polymer.telemetry.registrations.find(function(item) { return item.is === elementId });
var list = Polymer.telemetry.registrations;
// Mimics Array#find
for (var i = 0, length = list.length; i < length; i ) {
var element = list[i];
if (element.is === elementId) {
return true;
}
}
return false;
},

_onLoading: function() {
Expand Down

0 comments on commit da0a6b1

Please sign in to comment.