Repository navigation
fix(ios): undefined is not an object (evaluating 'measureSpec.setColumn') #7230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
manoldonev
merged 4 commits into
NativeScript:master
from
m-abs:fix/measureSpec-is-undefined
May 31, 2019
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5c13dd7
fix: TypeError: undefined is not an object (evaluating 'measureSpec.s…
m-abs 5bb4213
Merge branch 'master' into fix/measureSpec-is-undefined
manoldonev 3b94c99
Merge branch 'master' into fix/measureSpec-is-undefined
manoldonev 3acfc70
fix: register layout child for nested custom components
manoldonev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was reviewing our code and I am not sure trying to fix this exceptional situation by registering layout child here is a good idea. How about just skipping this specific layout child instead (as obviously something is not right with its current state)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've finally managed to reproduce the problem see: #7226 (comment)
I'm not sure what the best solution is or if we just use components+layouts incorrectly.
Just skipping as you suggest results in the component not being rendered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @m-abs thank you isolating the problem!
So just skipping the iteration when measureSpec is undefined is not an option, ok. Will investigate the code on the nativescript-angular side a bit but if I don't find a better solution I am going to merge yours as is.
Meanwhile, there is also a workaround that you can use -- wrap the contents of your sub1 component (sub1.component.html) in any kind of layout like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m-abs I think we found the root of the problem in the ProxyViewContainer class -- see my commit here: 3acfc70
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.