Skip to content

Commit 0d798c4

Browse files
committed
added jsonp condition to jsonpCallback
1 parent 1183d34 commit 0d798c4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

js/jquery.storelocator.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,14 @@ $.fn.storeLocator = function(options) {
325325
dataTypeRead = settings.dataType;
326326
}
327327

328+
console.log((settings.dataType === 'jsonp' ? settings.jsonpCallback : null));
329+
328330
//Process the data
329331
$.ajax({
330332
type: "GET",
331333
url: settings.dataLocation + (settings.dataType === 'jsonp' ? (settings.dataLocation.match(/\?/) ? '&' : '?') + 'callback=?' : ''),
332334
dataType: dataTypeRead,
333-
jsonpCallback: settings.jsonpCallback,
335+
jsonpCallback: (settings.dataType === 'jsonp' ? settings.jsonpCallback : null),
334336
beforeSend: function ()
335337
{
336338
// Callback

js/jquery.storelocator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)