(style-position)修复样式定位reset后未恢复默认值 (#433)

This commit is contained in:
tianxin 2024-04-23 09:00:23 +08:00 committed by GitHub
parent d613b4e8f6
commit 4fd55d4261
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -248,7 +248,9 @@ export const stringify = (originParseList, styleObject, config = {}) => {
// 在 styleObject 的,可能有改动,所以需要用 styleObject 拼接
for (const [key, value] of Object.entries(styleObject[item.selectors].rules)) {
str += `${key}: ${value};\n`
if (![null, undefined].includes(value)) {
str += `${key}: ${value};\n`
}
}
}
str += '}\n'