fix device ID setting so tools for Bangle.js 1 use the right ID

pull/2637/head
Gordon Williams 2023-03-07 14:58:07 +00:00
parent 4f8717c772
commit 781d7b96fd
1 changed files with 3 additions and 1 deletions

View File

@ -26,8 +26,10 @@ var device = { id : DEVICEID, appsInstalled : [] };
// call with {DEVICEID:"BANGLEJS/BANGLEJS2"}
exports.init = function(options) {
if (options.DEVICEID)
if (options.DEVICEID) {
DEVICEID = options.DEVICEID;
device.id = options.DEVICEID;
}
// Load app metadata
var dirs = require("fs").readdirSync(APPSDIR, {withFileTypes: true});
dirs.forEach(dir => {