only set nodeCachedData-prop when having a dir, #60332

This commit is contained in:
Johannes Rieken
2018-11-27 15:57:38 +01:00
parent 2319dc2389
commit 2c531e2ede
2 changed files with 16 additions and 10 deletions

14
src/bootstrap-amd.js vendored
View File

@@ -41,12 +41,14 @@ exports.load = function (entrypoint, onLoad, onError) {
}
// cached data config
loader.config({
nodeCachedData: {
path: process.env['VSCODE_NODE_CACHED_DATA_DIR'],
seed: entrypoint
}
});
if (process.env['VSCODE_NODE_CACHED_DATA_DIR']) {
loader.config({
nodeCachedData: {
path: process.env['VSCODE_NODE_CACHED_DATA_DIR'],
seed: entrypoint
}
});
}
onLoad = onLoad || function () { };
onError = onError || function (err) { console.error(err); };