Skip to content

Commit 057b255

Browse files
committed
map.addLayer supports rest args
1 parent d51cebe commit 057b255

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/map/Map.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,8 @@ class Map extends Handlerable(Eventable(Renderable(Class))) {
983983
return this;
984984
}
985985
if (!Array.isArray(layers)) {
986-
return this.addLayer([layers]);
986+
layers = Array.prototype.slice.call(arguments, 0);
987+
return this.addLayer(layers);
987988
}
988989
if (!this._layerCache) {
989990
this._layerCache = {};

0 commit comments

Comments
 (0)