Use Array.isArray instead of goog.isArray
This commit is contained in:
@@ -1515,7 +1515,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
*/
|
||||
var rendererTypes;
|
||||
if (options.renderer !== undefined) {
|
||||
if (goog.isArray(options.renderer)) {
|
||||
if (Array.isArray(options.renderer)) {
|
||||
rendererTypes = options.renderer;
|
||||
} else if (typeof options.renderer === 'string') {
|
||||
rendererTypes = [options.renderer];
|
||||
@@ -1550,7 +1550,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
|
||||
var controls;
|
||||
if (options.controls !== undefined) {
|
||||
if (goog.isArray(options.controls)) {
|
||||
if (Array.isArray(options.controls)) {
|
||||
controls = new ol.Collection(options.controls.slice());
|
||||
} else {
|
||||
goog.asserts.assertInstanceof(options.controls, ol.Collection,
|
||||
@@ -1563,7 +1563,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
|
||||
var interactions;
|
||||
if (options.interactions !== undefined) {
|
||||
if (goog.isArray(options.interactions)) {
|
||||
if (Array.isArray(options.interactions)) {
|
||||
interactions = new ol.Collection(options.interactions.slice());
|
||||
} else {
|
||||
goog.asserts.assertInstanceof(options.interactions, ol.Collection,
|
||||
@@ -1576,7 +1576,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
|
||||
var overlays;
|
||||
if (options.overlays !== undefined) {
|
||||
if (goog.isArray(options.overlays)) {
|
||||
if (Array.isArray(options.overlays)) {
|
||||
overlays = new ol.Collection(options.overlays.slice());
|
||||
} else {
|
||||
goog.asserts.assertInstanceof(options.overlays, ol.Collection,
|
||||
|
||||
Reference in New Issue
Block a user