Skip to content
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

fix: Don't warn if field is acually 0 width #6558

Merged
merged 2 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,10 +799,13 @@ export abstract class Field implements IASTNodeLocationSvg,
} else if (this.visible_ && this.size_.width === 0) {
// If the field is not visible the width will be 0 as well, one of the
// problems with the old system.
console.warn(
'Deprecated use of setting size_.width to 0 to rerender a' +
' field. Set field.isDirty_ to true instead.');
this.render_();
// Don't issue a warning if the field is actualy zero width.
Copy link
Collaborator

Choose a reason for hiding this comment

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

actualy -> actually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I miss the spellchecking of comments that Komodo IDE provided.

if (this.size_.width !== 0) {
console.warn(
'Deprecated use of setting size_.width to 0 to rerender a' +
' field. Set field.isDirty_ to true instead.');
}
}
return this.size_;
}
Expand Down
3 changes: 1 addition & 2 deletions core/utils/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ function tokenizeInterpolationInternal(
message: string, parseInterpolationTokens: boolean): (string|number)[] {
const tokens = [];
const chars = message.split('');
chars.push( // End marker.
'');
chars.push(''); // End marker.
// Parse the message with a finite state machine.
// 0 - Base case.
// 1 - % found.
Expand Down