Skip to content

Commit

Permalink
Allow empty ui path
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbutenaers committed Jan 9, 2021
1 parent 2f46bfb commit 8695e74
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions joystick.js
Expand Up @@ -302,8 +302,15 @@ module.exports = function(RED) {
// //ui: { path: "ui" },
// But as soon as the user has specified a custom UI path there, we will need to use that path:
// ui: { path: "mypath" },
var uiPath = ((RED.settings.ui || {}).path) || 'ui';

var uiPath = (RED.settings.ui || {}).path;

// When there was no ui path specified (i.e. '//ui: { path: "ui" }' not commented out in the settings.js file), then
// we need to apply the default 'ui' path. However, when an empty ui path has been specified (i.e. '//ui: { path: "" }'), then
// we should also use an empty ui path... See https://github.com/bartbutenaers/node-red-contrib-ui-svg/issues/86
if (uiPath == undefined) {
uiPath = 'ui';
}

// Create the complete server-side path
uiPath = '/' + uiPath + '/ui_joystick/js/*';

Expand Down

0 comments on commit 8695e74

Please sign in to comment.