@window-splitter/state 0.5.3 → 0.5.5

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/src/index.ts CHANGED
@@ -551,7 +551,17 @@ export function haveConstraintsChangedForPanel(
551
551
  return true;
552
552
  }
553
553
 
554
- if (a.collapseAnimation !== b.collapseAnimation) {
554
+ if (
555
+ (a.collapseAnimation && !b.collapseAnimation) ||
556
+ (!a.collapseAnimation && b.collapseAnimation) ||
557
+ (typeof a.collapseAnimation === "string" &&
558
+ typeof b.collapseAnimation === "string" &&
559
+ a.collapseAnimation !== b.collapseAnimation) ||
560
+ (typeof a.collapseAnimation === "object" &&
561
+ typeof b.collapseAnimation === "object" &&
562
+ (a.collapseAnimation.duration !== b.collapseAnimation.duration ||
563
+ a.collapseAnimation.easing !== b.collapseAnimation.easing))
564
+ ) {
555
565
  return true;
556
566
  }
557
567