From 8466c054f24fe3eacbd884aabdd38cf6ec482419 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 23 Jul 2013 08:20:05 +0000 Subject: [PATCH] dont fail with advanced find(pandora.user.ui._findState.key == advanced), fixes #1693 --- static/js/findElement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/findElement.js b/static/js/findElement.js index b516b7c76..7bb4cda95 100644 --- a/static/js/findElement.js +++ b/static/js/findElement.js @@ -118,7 +118,7 @@ pandora.ui.findElement = function() { ? pandora.user.ui._findState.key : that.value()[pandora.user.ui._list ? 1 : 0], findKey = Ox.getObjectById(pandora.site.findKeys, key); - return findKey.autocomplete ? function(value, callback) { + return findKey && findKey.autocomplete ? function(value, callback) { value === '' && Ox.Log('', 'Warning: autocomplete function should never be called with empty value'); pandora.api.autocomplete({ key: key,