summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authorkpn3m000 <smeefseewpe@dunflimblag.mailexpire.com>2014-07-03 14:24:41 +0200
committerkpn3m000 <smeefseewpe@dunflimblag.mailexpire.com>2014-07-03 14:24:41 +0200
commitda0fe98edc81ed2fef2486950980f5b6131ea5b0 (patch)
tree8591665a6b0e312ea81857fccecc108e5b03c805 /src/static
parenta3a40e1bccd938f86f147c5d1a99d296feb0e94e (diff)
downloadetherpad-lite-da0fe98edc81ed2fef2486950980f5b6131ea5b0.zip
Fixes search on plugins without Description
example "tables_ssl"
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/pluginfw/installer.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/static/js/pluginfw/installer.js b/src/static/js/pluginfw/installer.js
index e5602616..9f7ac939 100644
--- a/src/static/js/pluginfw/installer.js
+++ b/src/static/js/pluginfw/installer.js
@@ -84,7 +84,14 @@ exports.search = function(searchTerm, maxCacheAge, cb) {
for (var pluginName in results) { // for every available plugin
if (pluginName.indexOf(plugins.prefix) != 0) continue; // TODO: Also search in keywords here!
- if(searchTerm && !~pluginName.toLowerCase().indexOf(searchTerm) && !~results[pluginName].description.toLowerCase().indexOf(searchTerm)) continue;
+ if(searchTerm && !~results[pluginName].name.toLowerCase().indexOf(searchTerm)
+ && (typeof results[pluginName].description != "undefined" && !~results[pluginName].description.toLowerCase().indexOf(searchTerm) )
+ ){
+ if(typeof results[pluginName].description === "undefined"){
+ console.debug('plugin without Description: %s', results[pluginName].name);
+ }
+ continue;
+ }
res[pluginName] = results[pluginName];
}
cb && cb(null, res)