Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(android): race condition on offBackgroundColor view change detection#9922

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

NathanWalker
Copy link
Contributor

PR Checklist

What is the current behavior?

Various framework integrations, like Angular, may invoke view change detection cycles on property bindings at times when thenativeView is not available resulting in errors like:

JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'getTrackDrawable' of undefinedJS: TypeError: Cannot read property 'getTrackDrawable' of undefinedJS:     at Switch.setNativeBackgroundColor (file: src/webpack:/app/node_modules/@nativescript/core/ui/switch/index.android.js:48:0)JS:     at Switch._onCheckedPropertyChanged (file: src/webpack:/app/node_modules/@nativescript/core/ui/switch/index.android.js:61:0)

What is the new behavior?

Switch is now resilient to this.

@cla-botcla-botbot added the cla: yes labelMay 24, 2022
@farfromrefug
Copy link
Collaborator

@NathanWalker shouldn't this be handle on the property side ? isn't it already? don't think we want this test everywhere. the property setter handler seems like a better place to me

@NathanWalker
Copy link
ContributorAuthor

@farfromrefug good question, it seems that because this function is reused several places, it's called outside theProperty mechanics at times leading to the issue.

@NathanWalkerNathanWalker merged commit24c319e intoalphaJun 4, 2022
@NathanWalkerNathanWalker deleted the fix/switch-race-condition-view-change-detection branchJune 4, 2022 17:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@NathanWalker@farfromrefug

[8]ページ先頭

©2009-2025 Movatter.jp