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

Commit c596614

Browse files
Broccofilipesilva
authored andcommitted
fix(@angular/pwa): Validate to prevent additional properties
1 parent 47dfb5d commit c596614

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/angular/pwa/pwa/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ function addServiceWorker(options: PwaOptions): Rule {
2828
return (host: Tree, context: SchematicContext) => {
2929
context.logger.debug('Adding service worker...');
3030

31-
return externalSchematic('@schematics/angular', 'service-worker', options)(host, context);
31+
const swOptions = {
32+
...options,
33+
};
34+
delete swOptions.title;
35+
36+
return externalSchematic('@schematics/angular', 'service-worker', swOptions)(host, context);
3237
};
3338
}
3439

packages/angular/pwa/pwa/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"description": "The title of the application."
2727
}
2828
},
29-
"required": []
29+
"required": [],
30+
"additionalProperties": false
3031
}

0 commit comments

Comments
 (0)