Skip to content

Commit

Permalink
Let other browsers keep anonymous functions anonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaswilburn committed Sep 7, 2018
1 parent 912cfaf commit 33ec41c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflections/get-name/get-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function getName(obj) {
}

if (type === "function") {
if (!obj.name) {
if (!("name" in obj)) {
// IE doesn't support function.name natively
obj.name = "functionIE" + anonymousID++;
}
Expand Down

0 comments on commit 33ec41c

Please sign in to comment.