fix: window.open not accepting size values with "px" at the end (#26104)
* fix: use parseInt to parse sizes * fix: pass radix to parseInt Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Cheng Zhao <github@zcbenz.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
parent
f61dedb7e5
commit
d16e61dc85
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ const keysOfTypeNumber = ['top', 'left', ...Object.keys(keysOfTypeNumberCompileT
|
|||
type CoercedValue = string | number | boolean;
|
||||
function coerce (key: string, value: string): CoercedValue {
|
||||
if (keysOfTypeNumber.includes(key)) {
|
||||
return Number(value);
|
||||
return parseInt(value, 10);
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue