@vue/runtime-core 3.4.0-beta.1 → 3.4.0-beta.3

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.
@@ -1091,6 +1091,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
1091
1091
  return false;
1092
1092
  }
1093
1093
  function updateHOCHostEl({ vnode, parent }, el) {
1094
+ if (!el)
1095
+ return;
1094
1096
  while (parent) {
1095
1097
  const root = parent.subTree;
1096
1098
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -3262,24 +3264,30 @@ function useModel(props, name) {
3262
3264
  warn(`useModel() called with prop "${name}" which is not declared.`);
3263
3265
  return reactivity.ref();
3264
3266
  }
3265
- let localValue;
3266
- watchSyncEffect(() => {
3267
- localValue = props[name];
3268
- });
3269
- return reactivity.customRef((track, trigger) => ({
3270
- get() {
3271
- track();
3272
- return localValue;
3273
- },
3274
- set(value) {
3275
- const rawProps = i.vnode.props;
3276
- if (!(rawProps && name in rawProps) && shared.hasChanged(value, localValue)) {
3277
- localValue = value;
3267
+ return reactivity.customRef((track, trigger) => {
3268
+ let localValue;
3269
+ watchSyncEffect(() => {
3270
+ const propValue = props[name];
3271
+ if (shared.hasChanged(localValue, propValue)) {
3272
+ localValue = propValue;
3278
3273
  trigger();
3279
3274
  }
3280
- i.emit(`update:${name}`, value);
3281
- }
3282
- }));
3275
+ });
3276
+ return {
3277
+ get() {
3278
+ track();
3279
+ return localValue;
3280
+ },
3281
+ set(value) {
3282
+ const rawProps = i.vnode.props;
3283
+ if (!(rawProps && name in rawProps) && shared.hasChanged(value, localValue)) {
3284
+ localValue = value;
3285
+ trigger();
3286
+ }
3287
+ i.emit(`update:${name}`, value);
3288
+ }
3289
+ };
3290
+ });
3283
3291
  }
3284
3292
  function getContext() {
3285
3293
  const i = getCurrentInstance();
@@ -7935,7 +7943,7 @@ function isMemoSame(cached, memo) {
7935
7943
  return true;
7936
7944
  }
7937
7945
 
7938
- const version = "3.4.0-beta.1";
7946
+ const version = "3.4.0-beta.3";
7939
7947
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
7940
7948
  const _ssrUtils = {
7941
7949
  createComponentInstance,
@@ -607,6 +607,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
607
607
  return false;
608
608
  }
609
609
  function updateHOCHostEl({ vnode, parent }, el) {
610
+ if (!el)
611
+ return;
610
612
  while (parent) {
611
613
  const root = parent.subTree;
612
614
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -2511,24 +2513,30 @@ function useAttrs() {
2511
2513
  }
2512
2514
  function useModel(props, name) {
2513
2515
  const i = getCurrentInstance();
2514
- let localValue;
2515
- watchSyncEffect(() => {
2516
- localValue = props[name];
2517
- });
2518
- return reactivity.customRef((track, trigger) => ({
2519
- get() {
2520
- track();
2521
- return localValue;
2522
- },
2523
- set(value) {
2524
- const rawProps = i.vnode.props;
2525
- if (!(rawProps && name in rawProps) && shared.hasChanged(value, localValue)) {
2526
- localValue = value;
2516
+ return reactivity.customRef((track, trigger) => {
2517
+ let localValue;
2518
+ watchSyncEffect(() => {
2519
+ const propValue = props[name];
2520
+ if (shared.hasChanged(localValue, propValue)) {
2521
+ localValue = propValue;
2527
2522
  trigger();
2528
2523
  }
2529
- i.emit(`update:${name}`, value);
2530
- }
2531
- }));
2524
+ });
2525
+ return {
2526
+ get() {
2527
+ track();
2528
+ return localValue;
2529
+ },
2530
+ set(value) {
2531
+ const rawProps = i.vnode.props;
2532
+ if (!(rawProps && name in rawProps) && shared.hasChanged(value, localValue)) {
2533
+ localValue = value;
2534
+ trigger();
2535
+ }
2536
+ i.emit(`update:${name}`, value);
2537
+ }
2538
+ };
2539
+ });
2532
2540
  }
2533
2541
  function getContext() {
2534
2542
  const i = getCurrentInstance();
@@ -6224,7 +6232,7 @@ function isMemoSame(cached, memo) {
6224
6232
  return true;
6225
6233
  }
6226
6234
 
6227
- const version = "3.4.0-beta.1";
6235
+ const version = "3.4.0-beta.3";
6228
6236
  const ErrorTypeStrings = null;
6229
6237
  const _ssrUtils = {
6230
6238
  createComponentInstance,
@@ -1095,6 +1095,8 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
1095
1095
  return false;
1096
1096
  }
1097
1097
  function updateHOCHostEl({ vnode, parent }, el) {
1098
+ if (!el)
1099
+ return;
1098
1100
  while (parent) {
1099
1101
  const root = parent.subTree;
1100
1102
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -3268,24 +3270,30 @@ function useModel(props, name) {
3268
3270
  warn(`useModel() called with prop "${name}" which is not declared.`);
3269
3271
  return ref();
3270
3272
  }
3271
- let localValue;
3272
- watchSyncEffect(() => {
3273
- localValue = props[name];
3274
- });
3275
- return customRef((track, trigger) => ({
3276
- get() {
3277
- track();
3278
- return localValue;
3279
- },
3280
- set(value) {
3281
- const rawProps = i.vnode.props;
3282
- if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
3283
- localValue = value;
3273
+ return customRef((track, trigger) => {
3274
+ let localValue;
3275
+ watchSyncEffect(() => {
3276
+ const propValue = props[name];
3277
+ if (hasChanged(localValue, propValue)) {
3278
+ localValue = propValue;
3284
3279
  trigger();
3285
3280
  }
3286
- i.emit(`update:${name}`, value);
3287
- }
3288
- }));
3281
+ });
3282
+ return {
3283
+ get() {
3284
+ track();
3285
+ return localValue;
3286
+ },
3287
+ set(value) {
3288
+ const rawProps = i.vnode.props;
3289
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
3290
+ localValue = value;
3291
+ trigger();
3292
+ }
3293
+ i.emit(`update:${name}`, value);
3294
+ }
3295
+ };
3296
+ });
3289
3297
  }
3290
3298
  function getContext() {
3291
3299
  const i = getCurrentInstance();
@@ -8009,7 +8017,7 @@ function isMemoSame(cached, memo) {
8009
8017
  return true;
8010
8018
  }
8011
8019
 
8012
- const version = "3.4.0-beta.1";
8020
+ const version = "3.4.0-beta.3";
8013
8021
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8014
8022
  const _ssrUtils = {
8015
8023
  createComponentInstance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.4.0-beta.1",
3
+ "version": "3.4.0-beta.3",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/reactivity": "3.4.0-beta.1",
36
- "@vue/shared": "3.4.0-beta.1"
35
+ "@vue/reactivity": "3.4.0-beta.3",
36
+ "@vue/shared": "3.4.0-beta.3"
37
37
  }
38
38
  }