From: richard Date: Sat, 17 Jan 2004 01:49:18 +0000 (+0000) Subject: fixed check for JS pop()/push() to make more general (sf bug 877504) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86795a8498978f403af1cf19c85955f38f233651;p=roundup.git fixed check for JS pop()/push() to make more general (sf bug 877504) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2039 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/templates/classic/html/help_controls.js b/templates/classic/html/help_controls.js index c2a84e4..050c8dc 100644 --- a/templates/classic/html/help_controls.js +++ b/templates/classic/html/help_controls.js @@ -35,10 +35,11 @@ function push() { } } -// add the pop() and push() method to Array prototype for old IE browser -if (bName() == 1 && bVer() >= 5.5); -else { +// add the pop() and push() method to Array if they're not there +if (!Array.prototype.pop) { Array.prototype.pop = pop; +} +if (!Array.prototype.push) { Array.prototype.push = push; }