From: Robert Sesek Date: Wed, 28 Dec 2011 19:36:40 +0000 (-0500) Subject: Fix two incorrect usages of Array.splice X-Git-Tag: 0.8.600.0~15^2~2 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=9b027bdd9c4a791a7623797f2fecf0d2e9bfd0c2;p=armadillo.git Fix two incorrect usages of Array.splice --- diff --git a/web_frontend/main.js b/web_frontend/main.js index f769e8a..26f03b1 100644 --- a/web_frontend/main.js +++ b/web_frontend/main.js @@ -68,7 +68,7 @@ armadillo.App.prototype.list = function(path) { // Add a previous directory entry. if (path != '/' && path != '') - data.splice(0, 1, '../'); + data.unshift('../'); // Add items for each entry. $.each(data, function(i, file) { diff --git a/web_frontend/path_control.js b/web_frontend/path_control.js index 3923507..80348ab 100644 --- a/web_frontend/path_control.js +++ b/web_frontend/path_control.js @@ -158,7 +158,7 @@ armadillo.PathControl.prototype.fetchMenuContents_ = function(path, name, menu) } // Create an empty node for the current directory. - data.splice(0, 1, '/'); + data.unshift('/'); menu.empty(); $.each(data, function (i, caption) {