Skip to content

Commit 2938c27

Browse files
authored
Merge pull request #61 from halemmerich/allowDeviceListReset
Allow resetting the list of installed apps without complete init
2 parents e892f68 + 3e2160c commit 2938c27

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/apploader.js

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ var apps = [];
2626
var device = { id : DEVICEID, appsInstalled : [] };
2727
var language; // Object of translations
2828

29+
/* This resets the list of installed apps to an empty list.
30+
It can be used in case the device behind the apploader has changed
31+
after init (i.e. emulator factory reset) so the dependency
32+
resolution does not skip no longer installed apps.
33+
*/
34+
exports.reset = function(){
35+
device.appsInstalled = [];
36+
}
37+
2938
/* call with {
3039
DEVICEID:"BANGLEJS/BANGLEJS2"
3140
VERSION:"2v20"

0 commit comments

Comments
 (0)