use ES5 Array.isArray instead of lang.isArray
This commit is contained in:
parent
523bbba377
commit
a0d4f85b9e
2 changed files with 1 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue