Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 3d690cb

Browse files
committed
fix(ns-bundle): don't readd scripts from nativescript-dev-webpack
1 parent dcf21f8 commit 3d690cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: npmScriptsManager.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const DEPRECATED_SCRIPT_TEMPLATES = Object.freeze([
1717
const PLATFORMS = Object.freeze(["android", "ios"]);
1818

1919
function addNpmScripts(scripts) {
20+
scripts = scripts || {};
21+
2022
Object.keys(SCRIPT_TEMPLATES).forEach(name => {
2123
packageJson = addPlatformScript(scripts, name, SCRIPT_TEMPLATES[name]);
2224
});
@@ -51,8 +53,8 @@ function addPlatformScript(scripts, nameTemplate, commandTemplate) {
5153
}
5254

5355
function removePlatformScripts(scripts, nameTemplate) {
54-
if (!scripts) {
55-
return;
56+
if (!scripts || Object.keys(SCRIPT_TEMPLATES).includes(nameTemplate)) {
57+
return scripts;
5658
}
5759

5860
PLATFORMS.forEach(function (platform) {

0 commit comments

Comments
 (0)