Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 2209e64

Browse files
committed
fix: fix cannot read .toLowerCase() of undefined
NativeScript CLI throws `cannot read .toLowerCase() of undefined` error as there isn't platform property in platformData object. We should use prepareData instead.
1 parent f0c1e63 commit 2209e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5121,7 +5121,7 @@ module.exports = function($logger, hookArgs) {
51215121
for which environment {development|prod} the project was prepared. If needed, we delete the NS .nsprepareinfo
51225122
file so we force a new prepare
51235123
*/
5124-
var platform = (hookArgs.checkForChangesOpts || hookArgs.platformData).platform.toLowerCase();
5124+
var platform = (hookArgs.checkForChangesOpts || hookArgs.prepareData).platform.toLowerCase();
51255125
var projectData = (hookArgs.checkForChangesOpts && hookArgs.checkForChangesOpts.projectData) || hookArgs.projectData;
51265126
var platformsDir = projectData.platformsDir;
51275127
var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;

0 commit comments

Comments
 (0)