From a0d4f85b9e2038a1975a6d9fa72648661029797e Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 15 Dec 2010 11:41:59 +0100 Subject: [PATCH] use ES5 Array.isArray instead of lang.isArray --- lib/ace/document.js | 2 +- plugins/pilot/lang.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/ace/document.js b/lib/ace/document.js index 6b792a5b..bd4454dc 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -56,7 +56,7 @@ var Document = function(text, mode) { this.setMode(mode); } - if (lang.isArray(text)) { + if (Array.isArray(text)) { this.$insertLines(0, text); } else { this.$insert({row: 0, column: 0}, text); diff --git a/plugins/pilot/lang.js b/plugins/pilot/lang.js index 49ba8763..2641837b 100644 --- a/plugins/pilot/lang.js +++ b/plugins/pilot/lang.js @@ -61,10 +61,6 @@ else { }; } -exports.isArray = function(value) { - return Object.prototype.toString.call(value) == "[object Array]"; -}; - exports.copyObject = function(obj) { var copy = {}; for (var key in obj) {