From b00ac82eab8fb3ee4b4b7bbed5ee113b3d524bb6 Mon Sep 17 00:00:00 2001 From: drevicko Date: Mon, 13 Mar 2017 15:58:50 +0000 Subject: [PATCH] fix rendering problem when only one analysis plugin This fixes https://github.com/gsi-upm/senpy/issues/21 --- senpy/static/js/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/senpy/static/js/main.js b/senpy/static/js/main.js index cf9f2f1..0da121e 100644 --- a/senpy/static/js/main.js +++ b/senpy/static/js/main.js @@ -31,6 +31,9 @@ $(document).ready(function() { html=""; var availablePlugins = document.getElementById('availablePlugins'); plugins = response.plugins; + if (! $.isArray(plugins)) { + plugins = [plugins] + } for (r in plugins){ plugin = plugins[r] if (plugin["name"]){