From 1c334a3d7d6d6b83e90f0dd842254c4d05176a3d Mon Sep 17 00:00:00 2001 From: Jia Hao Date: Thu, 25 Feb 2016 16:51:23 +0800 Subject: [PATCH] Fix bug when no injection scripts is passed --- src/build/buildApp.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/build/buildApp.js b/src/build/buildApp.js index b488567..25bfa84 100644 --- a/src/build/buildApp.js +++ b/src/build/buildApp.js @@ -37,6 +37,11 @@ function buildApp(src, dest, options, callback) { } function maybeCopyScripts(srcs, dest) { + if (!srcs) { + return new Promise(resolve => { + resolve(); + }); + } const promises = srcs.map(src => { return new Promise((resolve, reject) => { if (!fs.existsSync(src)) {