@lvce-editor/panel-worker 2.10.0 → 2.10.1
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/panelWorkerMain.js +6 -1
- package/package.json +1 -1
package/dist/panelWorkerMain.js
CHANGED
|
@@ -1589,8 +1589,13 @@ const isEqual$1 = (oldState, newState) => {
|
|
|
1589
1589
|
return oldState.childUid === newState.childUid;
|
|
1590
1590
|
};
|
|
1591
1591
|
|
|
1592
|
+
const areBadgeCountsEqual = (oldBadgeCounts, newBadgeCounts) => {
|
|
1593
|
+
const oldKeys = Object.keys(oldBadgeCounts);
|
|
1594
|
+
const newKeys = Object.keys(newBadgeCounts);
|
|
1595
|
+
return oldKeys.length === newKeys.length && oldKeys.every(key => oldBadgeCounts[key] === newBadgeCounts[key]);
|
|
1596
|
+
};
|
|
1592
1597
|
const isEqual = (oldState, newState) => {
|
|
1593
|
-
return oldState.assetDir === newState.assetDir && oldState.initial === newState.initial && oldState.currentViewletId === newState.currentViewletId && oldState.maximized === newState.maximized && oldState.selectedIndex === newState.selectedIndex && oldState.views === newState.views && oldState.childUid === newState.childUid && oldState.actionsUid === newState.actionsUid;
|
|
1598
|
+
return oldState.assetDir === newState.assetDir && areBadgeCountsEqual(oldState.badgeCounts, newState.badgeCounts) && oldState.initial === newState.initial && oldState.currentViewletId === newState.currentViewletId && oldState.maximized === newState.maximized && oldState.selectedIndex === newState.selectedIndex && oldState.views === newState.views && oldState.childUid === newState.childUid && oldState.actionsUid === newState.actionsUid;
|
|
1594
1599
|
};
|
|
1595
1600
|
|
|
1596
1601
|
const RenderItems = 4;
|