Skip to content

Commit aaa9105

Browse files
Added ability to pass in array object as dataRaw
1 parent cd8211e commit aaa9105

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.0.9 - 2015-08-27
1+
/*! jQuery Google Maps Store Locator - v2.0.9 - 2015-08-28
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2015 Bjorn Holine; Licensed MIT */
44

@@ -424,7 +424,12 @@
424424

425425
// JSON
426426
else if( dataTypeRead === 'json' ) {
427-
return $.parseJSON(_this.settings.dataRaw);
427+
if (Array.isArray && Array.isArray(_this.settings.dataRaw))
428+
return _this.settings.dataRaw;
429+
else if (typeof _this.settings.dataRaw === 'string')
430+
return $.parseJSON(_this.settings.dataRaw);
431+
else
432+
return [];
428433
}
429434
}
430435
// Remote data

0 commit comments

Comments
 (0)