Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tns-core-modules/ui/styling/style-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ export class CssState {

public onUnloaded(): void {
this.unsubscribeFromDynamicUpdates();
this.view = undefined;
this._matchInvalid = false;
Copy link
Contributor

@facetious facetious Oct 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is poorly named. "Match invalid = false" implies that the match is valid, but you're about to set the match to undefined, which strikes me as ultimately invalid. It is usually best to name boolean variables as the "positive"; i.e. change the naming of the variable to _matchValid so that you're not doing gymnastics to understand double-negatives.

This comment was marked as abuse.

this._match = undefined;
}

@profile
Expand Down