Skip to content

Commit 49a8912

Browse files
authored
[native_assets_cli] Add base path for user-defines - fix (#2210)
1 parent 222eb98 commit 49a8912

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkgs/native_assets_cli/lib/src/user_defines.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ extension PackageUserDefinesSyntax on PackageUserDefines {
3838
workspacePubspec: workspacePubspec?.toSyntax(),
3939
);
4040
// Fallback behavior for old hooks: write user-defines here.
41-
result.json.addAll(workspacePubspec!.defines);
41+
if (workspacePubspec != null) {
42+
result.json.addAll(workspacePubspec!.defines);
43+
}
4244
return result;
4345
}
4446
}

0 commit comments

Comments
 (0)