framer-motion 7.5.1 → 7.5.2

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/cjs/index.js CHANGED
@@ -2245,7 +2245,7 @@ class MotionValue {
2245
2245
  * This will be replaced by the build step with the latest version number.
2246
2246
  * When MotionValues are provided to motion components, warn if versions are mixed.
2247
2247
  */
2248
- this.version = "7.5.1";
2248
+ this.version = "7.5.2";
2249
2249
  /**
2250
2250
  * Duration, in milliseconds, since last updating frame.
2251
2251
  *
@@ -4221,7 +4221,7 @@ function updateMotionValuesFromProps(element, next, prev) {
4221
4221
  * and warn against mismatches.
4222
4222
  */
4223
4223
  if (process.env.NODE_ENV === "development") {
4224
- warnOnce(nextValue.version === "7.5.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.1 may not work as expected.`);
4224
+ warnOnce(nextValue.version === "7.5.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.2 may not work as expected.`);
4225
4225
  }
4226
4226
  }
4227
4227
  else if (isMotionValue(prevValue)) {
@@ -4361,8 +4361,9 @@ const visualElement = ({ treeType = "", build, getBaseTarget, makeTargetAnimatab
4361
4361
  */
4362
4362
  if (props.values) {
4363
4363
  for (const key in props.values) {
4364
- if (latestValues[key] !== undefined) {
4365
- props.values[key].set(latestValues[key]);
4364
+ const value = props.values[key];
4365
+ if (latestValues[key] !== undefined && isMotionValue(value)) {
4366
+ value.set(latestValues[key]);
4366
4367
  }
4367
4368
  }
4368
4369
  }
@@ -117,8 +117,9 @@ const visualElement = ({ treeType = "", build, getBaseTarget, makeTargetAnimatab
117
117
  */
118
118
  if (props.values) {
119
119
  for (const key in props.values) {
120
- if (latestValues[key] !== undefined) {
121
- props.values[key].set(latestValues[key]);
120
+ const value = props.values[key];
121
+ if (latestValues[key] !== undefined && isMotionValue(value)) {
122
+ value.set(latestValues[key]);
122
123
  }
123
124
  }
124
125
  }
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
22
22
  * and warn against mismatches.
23
23
  */
24
24
  if (process.env.NODE_ENV === "development") {
25
- warnOnce(nextValue.version === "7.5.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.1 may not work as expected.`);
25
+ warnOnce(nextValue.version === "7.5.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.2 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -24,7 +24,7 @@ class MotionValue {
24
24
  * This will be replaced by the build step with the latest version number.
25
25
  * When MotionValues are provided to motion components, warn if versions are mixed.
26
26
  */
27
- this.version = "7.5.1";
27
+ this.version = "7.5.2";
28
28
  /**
29
29
  * Duration, in milliseconds, since last updating frame.
30
30
  *
@@ -3413,7 +3413,7 @@
3413
3413
  * This will be replaced by the build step with the latest version number.
3414
3414
  * When MotionValues are provided to motion components, warn if versions are mixed.
3415
3415
  */
3416
- this.version = "7.5.1";
3416
+ this.version = "7.5.2";
3417
3417
  /**
3418
3418
  * Duration, in milliseconds, since last updating frame.
3419
3419
  *
@@ -5389,7 +5389,7 @@
5389
5389
  * and warn against mismatches.
5390
5390
  */
5391
5391
  {
5392
- warnOnce(nextValue.version === "7.5.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.1 may not work as expected.`);
5392
+ warnOnce(nextValue.version === "7.5.2", `Attempting to mix Framer Motion versions ${nextValue.version} with 7.5.2 may not work as expected.`);
5393
5393
  }
5394
5394
  }
5395
5395
  else if (isMotionValue(prevValue)) {
@@ -5529,8 +5529,9 @@
5529
5529
  */
5530
5530
  if (props.values) {
5531
5531
  for (const key in props.values) {
5532
- if (latestValues[key] !== undefined) {
5533
- props.values[key].set(latestValues[key]);
5532
+ const value = props.values[key];
5533
+ if (latestValues[key] !== undefined && isMotionValue(value)) {
5534
+ value.set(latestValues[key]);
5534
5535
  }
5535
5536
  }
5536
5537
  }