@vue/compat 3.4.8 → 3.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.8
2
+ * @vue/compat v3.4.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3310,6 +3310,10 @@ const SuspenseImpl = {
3310
3310
  rendererInternals
3311
3311
  );
3312
3312
  } else {
3313
+ if (parentSuspense && parentSuspense.deps > 0) {
3314
+ n2.suspense = n1.suspense;
3315
+ return;
3316
+ }
3313
3317
  patchSuspense(
3314
3318
  n1,
3315
3319
  n2,
@@ -5983,58 +5987,6 @@ function useSlots() {
5983
5987
  function useAttrs() {
5984
5988
  return getContext().attrs;
5985
5989
  }
5986
- function useModel(props, name, options = EMPTY_OBJ) {
5987
- const i = getCurrentInstance();
5988
- if (!i) {
5989
- warn$1(`useModel() called without active instance.`);
5990
- return ref();
5991
- }
5992
- if (!i.propsOptions[0][name]) {
5993
- warn$1(`useModel() called with prop "${name}" which is not declared.`);
5994
- return ref();
5995
- }
5996
- const camelizedName = camelize(name);
5997
- const hyphenatedName = hyphenate(name);
5998
- const res = customRef((track, trigger) => {
5999
- let localValue;
6000
- watchSyncEffect(() => {
6001
- const propValue = props[name];
6002
- if (hasChanged(localValue, propValue)) {
6003
- localValue = propValue;
6004
- trigger();
6005
- }
6006
- });
6007
- return {
6008
- get() {
6009
- track();
6010
- return options.get ? options.get(localValue) : localValue;
6011
- },
6012
- set(value) {
6013
- const rawProps = i.vnode.props;
6014
- if (!(rawProps && // check if parent has passed v-model
6015
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
6016
- localValue = value;
6017
- trigger();
6018
- }
6019
- i.emit(`update:${name}`, options.set ? options.set(value) : value);
6020
- }
6021
- };
6022
- });
6023
- const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
6024
- res[Symbol.iterator] = () => {
6025
- let i2 = 0;
6026
- return {
6027
- next() {
6028
- if (i2 < 2) {
6029
- return { value: i2++ ? props[modifierKey] || {} : res, done: false };
6030
- } else {
6031
- return { done: true };
6032
- }
6033
- }
6034
- };
6035
- };
6036
- return res;
6037
- }
6038
5990
  function getContext() {
6039
5991
  const i = getCurrentInstance();
6040
5992
  if (!i) {
@@ -6606,7 +6558,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6606
6558
  return vm;
6607
6559
  }
6608
6560
  }
6609
- Vue.version = `2.6.14-compat:${"3.4.8"}`;
6561
+ Vue.version = `2.6.14-compat:${"3.4.10"}`;
6610
6562
  Vue.config = singletonApp.config;
6611
6563
  Vue.use = (p, ...options) => {
6612
6564
  if (p && isFunction(p.install)) {
@@ -8357,8 +8309,13 @@ function propHasMismatch(el, key, clientValue, vnode) {
8357
8309
  actual = el.hasAttribute(key);
8358
8310
  expected = includeBooleanAttr(clientValue);
8359
8311
  } else {
8360
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
8361
- expected = clientValue == null ? "" : String(clientValue);
8312
+ if (el.hasAttribute(key)) {
8313
+ actual = el.getAttribute(key);
8314
+ } else {
8315
+ const serverValue = el[key];
8316
+ actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
8317
+ }
8318
+ expected = isObject(clientValue) || clientValue == null ? "" : String(clientValue);
8362
8319
  }
8363
8320
  if (actual !== expected) {
8364
8321
  mismatchType = `attribute`;
@@ -8367,15 +8324,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
8367
8324
  }
8368
8325
  if (mismatchType) {
8369
8326
  const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8370
- warn$1(
8371
- `Hydration ${mismatchType} mismatch on`,
8372
- el,
8373
- `
8327
+ const preSegment = `Hydration ${mismatchType} mismatch on`;
8328
+ const postSegment = `
8374
8329
  - rendered on server: ${format(actual)}
8375
8330
  - expected on client: ${format(expected)}
8376
8331
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
8377
- You should fix the source of the mismatch.`
8378
- );
8332
+ You should fix the source of the mismatch.`;
8333
+ {
8334
+ warn$1(preSegment, el, postSegment);
8335
+ }
8379
8336
  return true;
8380
8337
  }
8381
8338
  return false;
@@ -11155,6 +11112,59 @@ const computed = (getterOrOptions, debugOptions) => {
11155
11112
  return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
11156
11113
  };
11157
11114
 
11115
+ function useModel(props, name, options = EMPTY_OBJ) {
11116
+ const i = getCurrentInstance();
11117
+ if (!i) {
11118
+ warn$1(`useModel() called without active instance.`);
11119
+ return ref();
11120
+ }
11121
+ if (!i.propsOptions[0][name]) {
11122
+ warn$1(`useModel() called with prop "${name}" which is not declared.`);
11123
+ return ref();
11124
+ }
11125
+ const camelizedName = camelize(name);
11126
+ const hyphenatedName = hyphenate(name);
11127
+ const res = customRef((track, trigger) => {
11128
+ let localValue;
11129
+ watchSyncEffect(() => {
11130
+ const propValue = props[name];
11131
+ if (hasChanged(localValue, propValue)) {
11132
+ localValue = propValue;
11133
+ trigger();
11134
+ }
11135
+ });
11136
+ return {
11137
+ get() {
11138
+ track();
11139
+ return options.get ? options.get(localValue) : localValue;
11140
+ },
11141
+ set(value) {
11142
+ const rawProps = i.vnode.props;
11143
+ if (!(rawProps && // check if parent has passed v-model
11144
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
11145
+ localValue = value;
11146
+ trigger();
11147
+ }
11148
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
11149
+ }
11150
+ };
11151
+ });
11152
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
11153
+ res[Symbol.iterator] = () => {
11154
+ let i2 = 0;
11155
+ return {
11156
+ next() {
11157
+ if (i2 < 2) {
11158
+ return { value: i2++ ? props[modifierKey] || {} : res, done: false };
11159
+ } else {
11160
+ return { done: true };
11161
+ }
11162
+ }
11163
+ };
11164
+ };
11165
+ return res;
11166
+ }
11167
+
11158
11168
  function h(type, propsOrChildren, children) {
11159
11169
  const l = arguments.length;
11160
11170
  if (l === 2) {
@@ -11377,7 +11387,7 @@ function isMemoSame(cached, memo) {
11377
11387
  return true;
11378
11388
  }
11379
11389
 
11380
- const version = "3.4.8";
11390
+ const version = "3.4.10";
11381
11391
  const warn = warn$1 ;
11382
11392
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11383
11393
  const devtools = devtools$1 ;
@@ -11847,6 +11857,7 @@ function useCssVars(getter) {
11847
11857
 
11848
11858
  function patchStyle(el, prev, next) {
11849
11859
  const style = el.style;
11860
+ const currentDisplay = style.display;
11850
11861
  const isCssString = isString(next);
11851
11862
  if (next && !isCssString) {
11852
11863
  if (prev && !isString(prev)) {
@@ -11860,7 +11871,6 @@ function patchStyle(el, prev, next) {
11860
11871
  setStyle(style, key, next[key]);
11861
11872
  }
11862
11873
  } else {
11863
- const currentDisplay = style.display;
11864
11874
  if (isCssString) {
11865
11875
  if (prev !== next) {
11866
11876
  const cssVarText = style[CSS_VAR_TEXT];
@@ -11872,9 +11882,9 @@ function patchStyle(el, prev, next) {
11872
11882
  } else if (prev) {
11873
11883
  el.removeAttribute("style");
11874
11884
  }
11875
- if (vShowOldKey in el) {
11876
- style.display = currentDisplay;
11877
- }
11885
+ }
11886
+ if (vShowOldKey in el) {
11887
+ style.display = currentDisplay;
11878
11888
  }
11879
11889
  }
11880
11890
  const semicolonRE = /[^\\];\s*$/;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.8
2
+ * @vue/compat v3.4.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2373,6 +2373,10 @@ const SuspenseImpl = {
2373
2373
  rendererInternals
2374
2374
  );
2375
2375
  } else {
2376
+ if (parentSuspense && parentSuspense.deps > 0) {
2377
+ n2.suspense = n1.suspense;
2378
+ return;
2379
+ }
2376
2380
  patchSuspense(
2377
2381
  n1,
2378
2382
  n2,
@@ -4785,50 +4789,6 @@ function useSlots() {
4785
4789
  function useAttrs() {
4786
4790
  return getContext().attrs;
4787
4791
  }
4788
- function useModel(props, name, options = EMPTY_OBJ) {
4789
- const i = getCurrentInstance();
4790
- const camelizedName = camelize(name);
4791
- const hyphenatedName = hyphenate(name);
4792
- const res = customRef((track, trigger) => {
4793
- let localValue;
4794
- watchSyncEffect(() => {
4795
- const propValue = props[name];
4796
- if (hasChanged(localValue, propValue)) {
4797
- localValue = propValue;
4798
- trigger();
4799
- }
4800
- });
4801
- return {
4802
- get() {
4803
- track();
4804
- return options.get ? options.get(localValue) : localValue;
4805
- },
4806
- set(value) {
4807
- const rawProps = i.vnode.props;
4808
- if (!(rawProps && // check if parent has passed v-model
4809
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
4810
- localValue = value;
4811
- trigger();
4812
- }
4813
- i.emit(`update:${name}`, options.set ? options.set(value) : value);
4814
- }
4815
- };
4816
- });
4817
- const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
4818
- res[Symbol.iterator] = () => {
4819
- let i2 = 0;
4820
- return {
4821
- next() {
4822
- if (i2 < 2) {
4823
- return { value: i2++ ? props[modifierKey] || {} : res, done: false };
4824
- } else {
4825
- return { done: true };
4826
- }
4827
- }
4828
- };
4829
- };
4830
- return res;
4831
- }
4832
4792
  function getContext() {
4833
4793
  const i = getCurrentInstance();
4834
4794
  return i.setupContext || (i.setupContext = createSetupContext(i));
@@ -5287,7 +5247,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5287
5247
  return vm;
5288
5248
  }
5289
5249
  }
5290
- Vue.version = `2.6.14-compat:${"3.4.8"}`;
5250
+ Vue.version = `2.6.14-compat:${"3.4.10"}`;
5291
5251
  Vue.config = singletonApp.config;
5292
5252
  Vue.use = (p, ...options) => {
5293
5253
  if (p && isFunction(p.install)) {
@@ -9049,6 +9009,51 @@ const computed = (getterOrOptions, debugOptions) => {
9049
9009
  return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
9050
9010
  };
9051
9011
 
9012
+ function useModel(props, name, options = EMPTY_OBJ) {
9013
+ const i = getCurrentInstance();
9014
+ const camelizedName = camelize(name);
9015
+ const hyphenatedName = hyphenate(name);
9016
+ const res = customRef((track, trigger) => {
9017
+ let localValue;
9018
+ watchSyncEffect(() => {
9019
+ const propValue = props[name];
9020
+ if (hasChanged(localValue, propValue)) {
9021
+ localValue = propValue;
9022
+ trigger();
9023
+ }
9024
+ });
9025
+ return {
9026
+ get() {
9027
+ track();
9028
+ return options.get ? options.get(localValue) : localValue;
9029
+ },
9030
+ set(value) {
9031
+ const rawProps = i.vnode.props;
9032
+ if (!(rawProps && // check if parent has passed v-model
9033
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
9034
+ localValue = value;
9035
+ trigger();
9036
+ }
9037
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
9038
+ }
9039
+ };
9040
+ });
9041
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
9042
+ res[Symbol.iterator] = () => {
9043
+ let i2 = 0;
9044
+ return {
9045
+ next() {
9046
+ if (i2 < 2) {
9047
+ return { value: i2++ ? props[modifierKey] || {} : res, done: false };
9048
+ } else {
9049
+ return { done: true };
9050
+ }
9051
+ }
9052
+ };
9053
+ };
9054
+ return res;
9055
+ }
9056
+
9052
9057
  function h(type, propsOrChildren, children) {
9053
9058
  const l = arguments.length;
9054
9059
  if (l === 2) {
@@ -9101,7 +9106,7 @@ function isMemoSame(cached, memo) {
9101
9106
  return true;
9102
9107
  }
9103
9108
 
9104
- const version = "3.4.8";
9109
+ const version = "3.4.10";
9105
9110
  const warn$1 = NOOP;
9106
9111
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9107
9112
  const devtools = void 0;
@@ -9565,6 +9570,7 @@ function useCssVars(getter) {
9565
9570
 
9566
9571
  function patchStyle(el, prev, next) {
9567
9572
  const style = el.style;
9573
+ const currentDisplay = style.display;
9568
9574
  const isCssString = isString(next);
9569
9575
  if (next && !isCssString) {
9570
9576
  if (prev && !isString(prev)) {
@@ -9578,7 +9584,6 @@ function patchStyle(el, prev, next) {
9578
9584
  setStyle(style, key, next[key]);
9579
9585
  }
9580
9586
  } else {
9581
- const currentDisplay = style.display;
9582
9587
  if (isCssString) {
9583
9588
  if (prev !== next) {
9584
9589
  const cssVarText = style[CSS_VAR_TEXT];
@@ -9590,9 +9595,9 @@ function patchStyle(el, prev, next) {
9590
9595
  } else if (prev) {
9591
9596
  el.removeAttribute("style");
9592
9597
  }
9593
- if (vShowOldKey in el) {
9594
- style.display = currentDisplay;
9595
- }
9598
+ }
9599
+ if (vShowOldKey in el) {
9600
+ style.display = currentDisplay;
9596
9601
  }
9597
9602
  }
9598
9603
  const importantRE = /\s*!important$/;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.8
2
+ * @vue/compat v3.4.10
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3259,6 +3259,10 @@ const SuspenseImpl = {
3259
3259
  rendererInternals
3260
3260
  );
3261
3261
  } else {
3262
+ if (parentSuspense && parentSuspense.deps > 0) {
3263
+ n2.suspense = n1.suspense;
3264
+ return;
3265
+ }
3262
3266
  patchSuspense(
3263
3267
  n1,
3264
3268
  n2,
@@ -5905,58 +5909,6 @@ function useSlots() {
5905
5909
  function useAttrs() {
5906
5910
  return getContext().attrs;
5907
5911
  }
5908
- function useModel(props, name, options = EMPTY_OBJ) {
5909
- const i = getCurrentInstance();
5910
- if (!i) {
5911
- warn$1(`useModel() called without active instance.`);
5912
- return ref();
5913
- }
5914
- if (!i.propsOptions[0][name]) {
5915
- warn$1(`useModel() called with prop "${name}" which is not declared.`);
5916
- return ref();
5917
- }
5918
- const camelizedName = camelize(name);
5919
- const hyphenatedName = hyphenate(name);
5920
- const res = customRef((track, trigger) => {
5921
- let localValue;
5922
- watchSyncEffect(() => {
5923
- const propValue = props[name];
5924
- if (hasChanged(localValue, propValue)) {
5925
- localValue = propValue;
5926
- trigger();
5927
- }
5928
- });
5929
- return {
5930
- get() {
5931
- track();
5932
- return options.get ? options.get(localValue) : localValue;
5933
- },
5934
- set(value) {
5935
- const rawProps = i.vnode.props;
5936
- if (!(rawProps && // check if parent has passed v-model
5937
- (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
5938
- localValue = value;
5939
- trigger();
5940
- }
5941
- i.emit(`update:${name}`, options.set ? options.set(value) : value);
5942
- }
5943
- };
5944
- });
5945
- const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
5946
- res[Symbol.iterator] = () => {
5947
- let i2 = 0;
5948
- return {
5949
- next() {
5950
- if (i2 < 2) {
5951
- return { value: i2++ ? props[modifierKey] || {} : res, done: false };
5952
- } else {
5953
- return { done: true };
5954
- }
5955
- }
5956
- };
5957
- };
5958
- return res;
5959
- }
5960
5912
  function getContext() {
5961
5913
  const i = getCurrentInstance();
5962
5914
  if (!i) {
@@ -6528,7 +6480,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6528
6480
  return vm;
6529
6481
  }
6530
6482
  }
6531
- Vue.version = `2.6.14-compat:${"3.4.8"}`;
6483
+ Vue.version = `2.6.14-compat:${"3.4.10"}`;
6532
6484
  Vue.config = singletonApp.config;
6533
6485
  Vue.use = (p, ...options) => {
6534
6486
  if (p && isFunction(p.install)) {
@@ -8279,8 +8231,13 @@ function propHasMismatch(el, key, clientValue, vnode) {
8279
8231
  actual = el.hasAttribute(key);
8280
8232
  expected = includeBooleanAttr(clientValue);
8281
8233
  } else {
8282
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
8283
- expected = clientValue == null ? "" : String(clientValue);
8234
+ if (el.hasAttribute(key)) {
8235
+ actual = el.getAttribute(key);
8236
+ } else {
8237
+ const serverValue = el[key];
8238
+ actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
8239
+ }
8240
+ expected = isObject(clientValue) || clientValue == null ? "" : String(clientValue);
8284
8241
  }
8285
8242
  if (actual !== expected) {
8286
8243
  mismatchType = `attribute`;
@@ -8289,15 +8246,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
8289
8246
  }
8290
8247
  if (mismatchType) {
8291
8248
  const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8292
- warn$1(
8293
- `Hydration ${mismatchType} mismatch on`,
8294
- el,
8295
- `
8249
+ const preSegment = `Hydration ${mismatchType} mismatch on`;
8250
+ const postSegment = `
8296
8251
  - rendered on server: ${format(actual)}
8297
8252
  - expected on client: ${format(expected)}
8298
8253
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
8299
- You should fix the source of the mismatch.`
8300
- );
8254
+ You should fix the source of the mismatch.`;
8255
+ {
8256
+ warn$1(preSegment, el, postSegment);
8257
+ }
8301
8258
  return true;
8302
8259
  }
8303
8260
  return false;
@@ -11060,6 +11017,59 @@ const computed = (getterOrOptions, debugOptions) => {
11060
11017
  return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
11061
11018
  };
11062
11019
 
11020
+ function useModel(props, name, options = EMPTY_OBJ) {
11021
+ const i = getCurrentInstance();
11022
+ if (!i) {
11023
+ warn$1(`useModel() called without active instance.`);
11024
+ return ref();
11025
+ }
11026
+ if (!i.propsOptions[0][name]) {
11027
+ warn$1(`useModel() called with prop "${name}" which is not declared.`);
11028
+ return ref();
11029
+ }
11030
+ const camelizedName = camelize(name);
11031
+ const hyphenatedName = hyphenate(name);
11032
+ const res = customRef((track, trigger) => {
11033
+ let localValue;
11034
+ watchSyncEffect(() => {
11035
+ const propValue = props[name];
11036
+ if (hasChanged(localValue, propValue)) {
11037
+ localValue = propValue;
11038
+ trigger();
11039
+ }
11040
+ });
11041
+ return {
11042
+ get() {
11043
+ track();
11044
+ return options.get ? options.get(localValue) : localValue;
11045
+ },
11046
+ set(value) {
11047
+ const rawProps = i.vnode.props;
11048
+ if (!(rawProps && // check if parent has passed v-model
11049
+ (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
11050
+ localValue = value;
11051
+ trigger();
11052
+ }
11053
+ i.emit(`update:${name}`, options.set ? options.set(value) : value);
11054
+ }
11055
+ };
11056
+ });
11057
+ const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
11058
+ res[Symbol.iterator] = () => {
11059
+ let i2 = 0;
11060
+ return {
11061
+ next() {
11062
+ if (i2 < 2) {
11063
+ return { value: i2++ ? props[modifierKey] || {} : res, done: false };
11064
+ } else {
11065
+ return { done: true };
11066
+ }
11067
+ }
11068
+ };
11069
+ };
11070
+ return res;
11071
+ }
11072
+
11063
11073
  function h(type, propsOrChildren, children) {
11064
11074
  const l = arguments.length;
11065
11075
  if (l === 2) {
@@ -11282,7 +11292,7 @@ function isMemoSame(cached, memo) {
11282
11292
  return true;
11283
11293
  }
11284
11294
 
11285
- const version = "3.4.8";
11295
+ const version = "3.4.10";
11286
11296
  const warn = warn$1 ;
11287
11297
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11288
11298
  const devtools = devtools$1 ;
@@ -11795,6 +11805,7 @@ function setVarsOnNode(el, vars) {
11795
11805
 
11796
11806
  function patchStyle(el, prev, next) {
11797
11807
  const style = el.style;
11808
+ const currentDisplay = style.display;
11798
11809
  const isCssString = isString(next);
11799
11810
  if (next && !isCssString) {
11800
11811
  if (prev && !isString(prev)) {
@@ -11808,7 +11819,6 @@ function patchStyle(el, prev, next) {
11808
11819
  setStyle(style, key, next[key]);
11809
11820
  }
11810
11821
  } else {
11811
- const currentDisplay = style.display;
11812
11822
  if (isCssString) {
11813
11823
  if (prev !== next) {
11814
11824
  const cssVarText = style[CSS_VAR_TEXT];
@@ -11820,9 +11830,9 @@ function patchStyle(el, prev, next) {
11820
11830
  } else if (prev) {
11821
11831
  el.removeAttribute("style");
11822
11832
  }
11823
- if (vShowOldKey in el) {
11824
- style.display = currentDisplay;
11825
- }
11833
+ }
11834
+ if (vShowOldKey in el) {
11835
+ style.display = currentDisplay;
11826
11836
  }
11827
11837
  }
11828
11838
  const semicolonRE = /[^\\];\s*$/;