Skip to content

Commit

Permalink
Merge pull request #4558 from fredj/isArray_Array.isArray
Browse files Browse the repository at this point in the history
Use isArray instead of Array.isArray
  • Loading branch information
mramato authored Oct 31, 2016
2 parents b097124 + 7b2d2d7 commit d60dfce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Source/Scene/UrlTemplateImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define([
'../Core/Event',
'../Core/freezeObject',
'../Core/GeographicTilingScheme',
'../Core/isArray',
'../Core/loadJson',
'../Core/loadText',
'../Core/loadWithXhr',
Expand All @@ -35,6 +36,7 @@ define([
Event,
freezeObject,
GeographicTilingScheme,
isArray,
loadJson,
loadText,
loadWithXhr,
Expand Down Expand Up @@ -548,7 +550,7 @@ define([
that._getFeatureInfoFormats = properties.getFeatureInfoFormats;

that._subdomains = properties.subdomains;
if (Array.isArray(that._subdomains)) {
if (isArray(that._subdomains)) {
that._subdomains = that._subdomains.slice();
} else if (defined(that._subdomains) && that._subdomains.length > 0) {
that._subdomains = that._subdomains.split('');
Expand Down
4 changes: 3 additions & 1 deletion Source/Scene/WebMapTileServiceImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ define([
'../Core/DeveloperError',
'../Core/Event',
'../Core/freezeObject',
'../Core/isArray',
'../Core/objectToQuery',
'../Core/queryToObject',
'../Core/Rectangle',
Expand All @@ -24,6 +25,7 @@ define([
DeveloperError,
Event,
freezeObject,
isArray,
objectToQuery,
queryToObject,
Rectangle,
Expand Down Expand Up @@ -153,7 +155,7 @@ define([
this._credit = typeof credit === 'string' ? new Credit(credit) : credit;

this._subdomains = options.subdomains;
if (Array.isArray(this._subdomains)) {
if (isArray(this._subdomains)) {
this._subdomains = this._subdomains.slice();
} else if (defined(this._subdomains) && this._subdomains.length > 0) {
this._subdomains = this._subdomains.split('');
Expand Down

0 comments on commit d60dfce

Please sign in to comment.