rita-workspace 0.5.19 → 0.5.20
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/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -834,6 +834,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
|
|
|
834
834
|
}, [workspace]);
|
|
835
835
|
const saveCurrentDrawing = (0, import_react.useCallback)(async (elements, appState, files) => {
|
|
836
836
|
if (!activeDrawing) return;
|
|
837
|
+
if (isDrawingOpenedEarlierInOtherTab(activeDrawing.id)) return;
|
|
837
838
|
try {
|
|
838
839
|
const updateData = {
|
|
839
840
|
elements,
|
|
@@ -848,6 +849,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
|
|
|
848
849
|
}
|
|
849
850
|
}, [activeDrawing]);
|
|
850
851
|
const saveDrawingById = (0, import_react.useCallback)(async (id, elements, appState, files) => {
|
|
852
|
+
if (isDrawingOpenedEarlierInOtherTab(id)) return;
|
|
851
853
|
try {
|
|
852
854
|
const updateData = {
|
|
853
855
|
elements,
|
package/dist/index.mjs
CHANGED
|
@@ -763,6 +763,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
|
|
|
763
763
|
}, [workspace]);
|
|
764
764
|
const saveCurrentDrawing = useCallback(async (elements, appState, files) => {
|
|
765
765
|
if (!activeDrawing) return;
|
|
766
|
+
if (isDrawingOpenedEarlierInOtherTab(activeDrawing.id)) return;
|
|
766
767
|
try {
|
|
767
768
|
const updateData = {
|
|
768
769
|
elements,
|
|
@@ -777,6 +778,7 @@ function WorkspaceProvider({ children, lang = "en" }) {
|
|
|
777
778
|
}
|
|
778
779
|
}, [activeDrawing]);
|
|
779
780
|
const saveDrawingById = useCallback(async (id, elements, appState, files) => {
|
|
781
|
+
if (isDrawingOpenedEarlierInOtherTab(id)) return;
|
|
780
782
|
try {
|
|
781
783
|
const updateData = {
|
|
782
784
|
elements,
|