Skip to content

Commit eebd32f

Browse files
committed
[demo] Fix bug with empty data
1 parent d7b339d commit eebd32f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dist/brackets-viewer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/stage-form-creator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/form.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function updateFormCreator(configuration: FormConfiguration, changeCallab
8585
const id = urlParams.get('id') ?? 0;
8686

8787
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
88-
const storedBrackets = JSON.parse(localStorage.getItem('brackets') ?? '');
88+
const storedBrackets = JSON.parse(localStorage.getItem('brackets') ?? '{}');
8989
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
9090
const currentBracket = storedBrackets[id] as Database;
9191

@@ -140,7 +140,7 @@ function createBaseMask(parent: HTMLElement, configuration: FormConfiguration, s
140140
const id = urlParams.get('id') ?? 0;
141141

142142
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
143-
const storedBrackets = JSON.parse(localStorage.getItem('brackets') ?? '');
143+
const storedBrackets = JSON.parse(localStorage.getItem('brackets') ?? '{}');
144144
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
145145
const currentBracket = storedBrackets[id] as Database;
146146

0 commit comments

Comments
 (0)