Skip to content

Commit

Permalink
Bind correct store
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Jun 28, 2022
1 parent f95c42d commit a02bd4b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion src/lib/components/view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
}
} catch (e) {
console.log('view fail', e);
// errorStore.set(e);
error = true;
}
});
Expand Down
1 change: 0 additions & 1 deletion src/lib/util/fileLoaders/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ export const loadDataFromUrl = async (): Promise<void> => {
updateDiagram: true,
updateEditor: true
});
// window.location.search = '';
};
4 changes: 0 additions & 4 deletions src/lib/util/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ export const stateStore: Readable<ValidatedState> = derived([inputStateStore], (
message: e.str
};
processed.errorMarkers = [marker];
// Clear all previous errors before this error.
// errorMarkers = errorMarkers.filter(
// (m) => m.startLineNumber >= marker.startLineNumber && m.startColumn >= marker.startColumn
// );
} catch (err) {
console.error('Error without line helper', err);
}
Expand Down
4 changes: 1 addition & 3 deletions src/routes/edit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import type { EditorUpdateEvent, State, Tab, DocConfig } from '$lib/types';
import { base } from '$app/paths';
// stateStore; // Weird fix for error > serializedState is not defined. Treeshaking?
type Modes = 'code' | 'config';
type Languages = 'mermaid' | 'json';
Expand Down Expand Up @@ -153,7 +151,7 @@
type="checkbox"
class="toggle {$stateStore.autoSync ? 'btn-secondary' : 'toggle-primary'} ml-1"
id="autoSync"
bind:checked={$stateStore.autoSync} />
bind:checked={$inputStateStore.autoSync} />
</label>
</div>

Expand Down

0 comments on commit a02bd4b

Please sign in to comment.