|
1 |
| -/*! jQuery Google Maps Store Locator - v1.4.9 - 2014-09-13 |
| 1 | +/*! jQuery Google Maps Store Locator - v1.4.9 - 2014-09-14 |
2 | 2 | * http://www.bjornblog.com/web/jquery-store-locator-plugin
|
3 | 3 | * Copyright (c) 2014 Bjorn Holine; Licensed MIT */
|
4 | 4 |
|
|
233 | 233 | * Check for query string
|
234 | 234 | *
|
235 | 235 | * @param param {string} query string parameter to test
|
236 |
| - * @returns {string} |
| 236 | + * @returns {string} query string value |
237 | 237 | */
|
238 | 238 | getQueryString: function(param) {
|
239 |
| - param = param.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); |
240 |
| - var regex = new RegExp('[\\?&]' + param + '=([^&#]*)'), |
| 239 | + if(param) { |
| 240 | + param = param.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); |
| 241 | + var regex = new RegExp('[\\?&]' + param + '=([^&#]*)'), |
241 | 242 | results = regex.exec(location.search);
|
242 |
| - return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); |
| 243 | + return (results === null) ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); |
| 244 | + } |
243 | 245 | },
|
244 | 246 |
|
245 | 247 | /**
|
|
269 | 271 | _this.locator();
|
270 | 272 |
|
271 | 273 | }, function () {
|
272 |
| - // KML templates not loaded - you can add a console.log here to see if your templates are failing |
273 |
| - |
| 274 | + // KML templates not loaded |
| 275 | + alert('Error: could not load plugin templates'); |
274 | 276 | });
|
275 | 277 | }
|
276 | 278 | // Handle script tag template method
|
|
304 | 306 | _this.locator();
|
305 | 307 |
|
306 | 308 | }, function () {
|
307 |
| - // JSON/XML templates not loaded - you can add a console.log here to see if your templates are failing |
308 |
| - |
| 309 | + // JSON/XML templates not loaded |
| 310 | + alert('Error: could not load plugin templates'); |
309 | 311 | });
|
310 | 312 | }
|
311 | 313 | },
|
|
0 commit comments