From 1ef0cd4e9cddb9541ecd2f2e2bb47b51c209b18a Mon Sep 17 00:00:00 2001 From: webchick Date: Mon, 30 Apr 2012 22:04:36 -0700 Subject: Issue #1459164 by Kevin Morse, droplet: Use test() to match string for BOOL comparison . --- modules/system/system.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/system') diff --git a/modules/system/system.js b/modules/system/system.js index f4bdc6d07..910fb5d3d 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -105,7 +105,7 @@ Drupal.behaviors.dateTime = { // Attach keyup handler to custom format inputs. $('input' + source, context).once('date-time').keyup(function () { var input = $(this); - var url = fieldSettings.lookup + (fieldSettings.lookup.match(/\?q=/) ? '&format=' : '?format=') + encodeURIComponent(input.val()); + var url = fieldSettings.lookup + (/\?q=/.test(fieldSettings.lookup) ? '&format=' : '?format=') + encodeURIComponent(input.val()); $.getJSON(url, function (data) { $(suffix).empty().append(' ' + fieldSettings.text + ': ' + data + ''); }); -- cgit v1.2.3