Przeglądaj źródła

fix previous fix

Gildas 4 lat temu
rodzic
commit
ae0be2c96d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      cli/back-ends/common/scripts.js

+ 1 - 1
cli/back-ends/common/scripts.js

@@ -42,7 +42,7 @@ const WEB_SCRIPTS = [
 
 
 exports.get = async options => {
 exports.get = async options => {
 	const basePath = "../../../";
 	const basePath = "../../../";
-	let scripts = "let _singleFileDefine; if (define) { _singleFileDefine = define; define = null }";
+	let scripts = "let _singleFileDefine; if (typeof define !== 'undefined') { _singleFileDefine = define; define = null }";
 	scripts += await readScriptFiles(INDEX_SCRIPTS, basePath);
 	scripts += await readScriptFiles(INDEX_SCRIPTS, basePath);
 	const webScripts = {};
 	const webScripts = {};
 	await Promise.all(WEB_SCRIPTS.map(async path => webScripts[path] = await readScriptFile(path, basePath)));
 	await Promise.all(WEB_SCRIPTS.map(async path => webScripts[path] = await readScriptFile(path, basePath)));