Skip to content

Commit

Permalink
show validation errors; fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lhns committed Feb 27, 2023
1 parent 0e01280 commit 1c4280d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GitJsonEditorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GitJsonEditorComponent extends React.Component<{
if (globalError != null) {
return <div className="p-3">
<Alert>
{globalError}
<pre>{globalError}</pre>
</Alert>
</div>
} else {
Expand Down Expand Up @@ -120,7 +120,7 @@ class GitJsonEditorComponent extends React.Component<{
}}/> :
schemaError != null ?
<Alert>
{schemaError}
<pre>{schemaError}</pre>
</Alert> :
null}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/JsonEditorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class InternalJsonEditorComponent extends React.Component<{
const editor = new JSONEditor(elem, {
theme: 'bootstrap5',
iconlib: 'openiconic',
show_errors: 'always',
schema: schema,
startval: initialData
})
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
url: url,
corsProxy: import.meta.env.VITE_CORS_PROXY
}}
client_ids={JSON.parse(import.meta.env.VITE_CLIENT_IDS)}
client_ids={JSON.parse(import.meta.env.VITE_CLIENT_IDS || '{}')}
redirect_origin={import.meta.env.VITE_REDIRECT_ORIGIN}/>
}</React.StrictMode>,
)

0 comments on commit 1c4280d

Please sign in to comment.