diff --git a/static/js/utils.js b/static/js/utils.js index c75698823..e0a9233b3 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1654,6 +1654,11 @@ pandora.getItem = function(state, str, callback) { } }); } else if (state.type == 'documents') { + if (!pandora.isBase26(str)) { + state.item = ''; + callback(); + return + } pandora.api.getDocument({ id: str, // send keys so that subsequent request when parsing @@ -1702,6 +1707,10 @@ pandora.getItem = function(state, str, callback) { } }; +pandora.isBase26 = function(value) { + return /^[A-Z]+$/.test(value) +}; + pandora.getItemFind = function(find) { var itemFind = ''; Ox.forEach(find.conditions, function(condition) {