mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-03 20:34:40 +01:00 
			
		
		
		
	fix: Multi-point arrows and linears
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
		@@ -16,7 +16,6 @@ import {
 | 
			
		||||
  DEFAULT_SIDEBAR,
 | 
			
		||||
  debounce,
 | 
			
		||||
} from "@excalidraw/common";
 | 
			
		||||
import { clearElementsForLocalStorage } from "@excalidraw/element";
 | 
			
		||||
import {
 | 
			
		||||
  createStore,
 | 
			
		||||
  entries,
 | 
			
		||||
@@ -81,7 +80,7 @@ const saveDataStateToLocalStorage = (
 | 
			
		||||
 | 
			
		||||
    localStorage.setItem(
 | 
			
		||||
      STORAGE_KEYS.LOCAL_STORAGE_ELEMENTS,
 | 
			
		||||
      JSON.stringify(clearElementsForLocalStorage(elements)),
 | 
			
		||||
      JSON.stringify(elements),
 | 
			
		||||
    );
 | 
			
		||||
    localStorage.setItem(
 | 
			
		||||
      STORAGE_KEYS.LOCAL_STORAGE_APP_STATE,
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,6 @@ import {
 | 
			
		||||
  clearAppStateForLocalStorage,
 | 
			
		||||
  getDefaultAppState,
 | 
			
		||||
} from "@excalidraw/excalidraw/appState";
 | 
			
		||||
import { clearElementsForLocalStorage } from "@excalidraw/element";
 | 
			
		||||
 | 
			
		||||
import type { ExcalidrawElement } from "@excalidraw/element/types";
 | 
			
		||||
import type { AppState } from "@excalidraw/excalidraw/types";
 | 
			
		||||
@@ -50,7 +49,7 @@ export const importFromLocalStorage = () => {
 | 
			
		||||
  let elements: ExcalidrawElement[] = [];
 | 
			
		||||
  if (savedElements) {
 | 
			
		||||
    try {
 | 
			
		||||
      elements = clearElementsForLocalStorage(JSON.parse(savedElements));
 | 
			
		||||
      elements = JSON.parse(savedElements);
 | 
			
		||||
    } catch (error: any) {
 | 
			
		||||
      console.error(error);
 | 
			
		||||
      // Do nothing because elements array is already empty
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user