Skip to content

Commit cafcf51

Browse files
committed
fix(plugin): only add metadata json path to vscode settings if it's not there
1 parent 07eca89 commit cafcf51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: libs/plugin/src/generators/utils.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export function addMetadataJson(tree: Tree, metadataJsonPath: string) {
1313
writeJson(tree, vscodeSettingsPath, {});
1414
}
1515
updateJson(tree, vscodeSettingsPath, (json) => {
16-
if (json['html.customData'] && Array.isArray(json['html.customData'])) {
16+
if (
17+
json['html.customData'] &&
18+
Array.isArray(json['html.customData']) &&
19+
!json['html.customData'].includes(metadataJsonPath)
20+
) {
1721
json['html.customData'].push(metadataJsonPath);
1822
} else {
1923
json['html.customData'] = [metadataJsonPath];

0 commit comments

Comments
 (0)