-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular-devkit/schematics): throw more relevant error when Rule …
…returns invalid null value A `null` value is not considered a valid return value for a schematics Rule. While the Rule type should prevent this, casting could allow this to potentially occur. Previously, this would accidentally be treated the same as a void return due to incomplete result checking. However, recent refactoring caused the `null` case to fail with a non-obvious error message when it should have failed with the existing `InvalidRuleResultException`. Non-tree result objects including `null` will now fail with `InvalidRuleResultException`. (cherry picked from commit 8eb58bd)
- Loading branch information
Showing
2 changed files
with
12 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters