comparison mpui.js @ 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
comparison
equal deleted inserted replaced
213:ddb36f1c515f 214:bd63ecb82e61
276 mpUIForcedWidth = mpUIForcedHeight = 0; 276 mpUIForcedWidth = mpUIForcedHeight = 0;
277 277
278 mpUIScale = stGetSelValue(stGE("scalesID"), -1); 278 mpUIScale = stGetSelValue(stGE("scalesID"), -1);
279 279
280 index = stGetSelValue(stGE("paletteID"), -1); 280 index = stGetSelValue(stGE("paletteID"), -1);
281 if (index >= 0) 281 mpUIPalette = (index >= 0) ? mpPalettes[machine[2]][index] : "";
282 mpUIPalette = mpPalettes[machine[2]][index];
283 282
284 stClearChildren(mpUI); 283 stClearChildren(mpUI);
285 284
286 // Initialize the canvas etc. 285 // Initialize the canvas etc.
287 var mpCanvas = stGE("mpCanvas"); 286 var mpCanvas = stGE("mpCanvas");