Skip to content

Commit 8b627d8

Browse files
author
Richard Jones
committed
fixed check for JS pop()/push() to make more general [SF#877504]
1 parent 25ae3ef commit 8b627d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

templates/classic/html/help_controls.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ function push() {
3535
}
3636
}
3737

38-
// add the pop() and push() method to Array prototype for old IE browser
39-
if (bName() == 1 && bVer() >= 5.5);
40-
else {
38+
// add the pop() and push() method to Array if they're not there
39+
if (!Array.prototype.pop) {
4140
Array.prototype.pop = pop;
41+
}
42+
if (!Array.prototype.push) {
4243
Array.prototype.push = push;
4344
}
4445

0 commit comments

Comments
 (0)