-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
refactor: reset css property value when ''" (empty string) is set #5085
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
Conversation
@@ -1049,6 +1050,9 @@ export class ShorthandProperty<T extends Style, P> implements definitions.Shorth | |||
} | |||
} | |||
|
|||
const shouldResetCssProperty = value => |
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.
Inline this.
c1bf8cd
to
a30600b
Compare
@@ -534,7 +535,8 @@ export class CssProperty<T extends Style, U> implements definitions.CssProperty< | |||
} | |||
|
|||
function setCssValue(this: T, value: U): void { | |||
const reset = value === unsetValue; | |||
const reset = value === unsetValue || | |||
typeof value === "string" && value === ""; |
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.
value === "" should suffice
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.
value is of type U. I can't be even explicitly casted to <string>. Should I cast it to <any>?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.