changeset 214:bd63ecb82e61

Minor fix, avoid generating "undefined" text in the URLs.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Sep 2018 14:32:03 +0300
parents ddb36f1c515f
children 280d95196265
files mpui.js
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mpui.js	Mon Sep 03 14:28:58 2018 +0300
+++ b/mpui.js	Mon Sep 03 14:32:03 2018 +0300
@@ -278,8 +278,7 @@
   mpUIScale = stGetSelValue(stGE("scalesID"), -1);
 
   index = stGetSelValue(stGE("paletteID"), -1);
-  if (index >= 0)
-    mpUIPalette = mpPalettes[machine[2]][index];
+  mpUIPalette = (index >= 0) ? mpPalettes[machine[2]][index] : "";
 
   stClearChildren(mpUI);