Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
fix(@angular/pwa): Validate to prevent additional properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Brocco authored and filipesilva committed May 24, 2018
1 parent 47dfb5d commit c596614
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/angular/pwa/pwa/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ function addServiceWorker(options: PwaOptions): Rule {
return (host: Tree, context: SchematicContext) => {
context.logger.debug('Adding service worker...');

return externalSchematic('@schematics/angular', 'service-worker', options)(host, context);
const swOptions = {
...options,
};
delete swOptions.title;

return externalSchematic('@schematics/angular', 'service-worker', swOptions)(host, context);
};
}

Expand Down
3 changes: 2 additions & 1 deletion packages/angular/pwa/pwa/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"description": "The title of the application."
}
},
"required": []
"required": [],
"additionalProperties": false
}

0 comments on commit c596614

Please sign in to comment.