Conversation
susnux
commented
Dec 21, 2025
Comment on lines
+49
to
+60
| it('Can register a view with only required files', async () => { | ||
| const view = new View({ | ||
| id: 'minimal', | ||
| name: 'Minimal view', | ||
| icon: '<svg></svg>', | ||
| getContents: () => Promise.reject(new Error('Not implemented')), | ||
| }) | ||
|
|
||
| const navigation = new Navigation() | ||
| navigation.register(view) | ||
| expect(navigation.views).toEqual([view]) | ||
| }) |
Contributor
Author
There was a problem hiding this comment.
This is failing without this changes
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1438 +/- ##
==========================================
- Coverage 89.47% 89.23% -0.24%
==========================================
Files 25 25
Lines 703 706 +3
Branches 194 190 -4
==========================================
+ Hits 629 630 +1
- Misses 62 63 +1
- Partials 12 13 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ShGKme
reviewed
Dec 22, 2025
ShGKme
reviewed
Dec 22, 2025
ShGKme
approved these changes
Dec 22, 2025
This fixes an issue when using the `View` class as in this case the check `'property' in view` will always return true, thus the typecheck would fail when using the view class and `navigation.register`. Signed-off-by: Ferdinand Thiessen <[email protected]>
Contributor
Author
|
rebased and added the null check |
susnux
commented
Dec 22, 2025
Comment on lines
+273
to
+275
| } else if (type === 'object' && (obj[property] === null || Array.isArray(obj[property]))) { | ||
| throw new Error(`View ${property} must be an object`) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This was added on the rebase
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue when using the
Viewclass as in this case the check'property' in viewwill always return true,thus the type check would fail when using the view class and
navigation.register.