From 84baa1d2b1e4fe1e21f29b62fe5f946b91238156 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 3 Sep 2010 17:35:00 +0000 Subject: [PATCH] use slice to clone arguments as an array, because arguments does not support splice git-svn-id: svn://svn.open-ils.org/ILS/trunk@17477 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/MARC/Record.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/dojo/MARC/Record.js b/Open-ILS/web/js/dojo/MARC/Record.js index 5c9fb9d19..163dc32ee 100644 --- a/Open-ILS/web/js/dojo/MARC/Record.js +++ b/Open-ILS/web/js/dojo/MARC/Record.js @@ -83,12 +83,13 @@ if(!dojo._hasResource["MARC.Record"]) { }, insertFieldsBefore : function (target) { - arguments.splice(0,1); + var args = Array.prototype.slice.call(arguments); + args.splice(0,1); var me = this; for (var j = 0; j < this.fields.length; j++) { if (target === this.fields[j]) { j--; - dojo.forEach( arguments, function (f) { + dojo.forEach( args, function (f) { me.fields.splice(j++,0,f); }); break; @@ -97,11 +98,12 @@ if(!dojo._hasResource["MARC.Record"]) { }, insertFieldsAfter : function (target) { - arguments.splice(0,1); + var args = Array.prototype.slice.call(arguments); + args.splice(0,1); var me = this; for (var j = 0; j < this.fields.length; j++) { if (target === this.fields[j]) { - dojo.forEach( arguments, function (f) { + dojo.forEach( args, function (f) { me.fields.splice(j++,0,f); }); break; -- 2.11.0