10000 fix: don't use null coalescing assignment, as it breaks compilation · alexandreiflor1/nativescript-vue@61bbe43 · GitHub
[go: up one dir, main page]

Skip to content

Commit 61bbe43

Browse files
committed
fix: don't use null coalescing assignment, as it breaks compilation
1 parent 2ca8600 commit 61bbe43

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/renderer/modules/style.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function normalizeProperty(property: string) {
2727
export const STYLE_ORIGINAL_VALUE = Symbol("style_original_value");
2828

2929
function addStyleProperty(el: NSVElement, property: string, value: any) {
30-
const _sov: Map<string, any> = (el[STYLE_ORIGINAL_VALUE] ??= new Map());
30+
const _sov: Map<string, any> =
31+
el[STYLE_ORIGINAL_VALUE] ?? (el[STYLE_ORIGINAL_VALUE] = new Map());
3132
property = normalizeProperty(property);
3233

3334
if (!_sov.has(property)) {
@@ -38,7 +39,8 @@ function addStyleProperty(el: NSVElement, property: string, value: any) {
3839
}
3940

4041
function removeStyleProperty(el: NSVElement, property: string) {
41-
const _sov: Map<string, any> = (el[STYLE_ORIGINAL_VALUE] ??= new Map());
42+
const _sov: Map<string, any> =
43+
el[STYLE_ORIGINAL_VALUE] ?? (el[STYLE_ORIGINAL_VALUE] = new Map());
4244
property = normalizeProperty(property);
4345

4446
// only delete styles we added
@@ -53,6 +55,7 @@ function removeStyleProperty(el: NSVElement, property: string) {
5355
}
5456
}
5557

58+
// todo: perhaps mimic dom version with prefixing stripped out: https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/modules/style.ts
5659
export function patchStyle(el: NSVElement, prev: Style, next: Style) {
5760
if (prev) {
5861
const style = normalizeStyle(prev);

0 commit comments

Comments
 (0)
0