Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 11, 2024
1 parent 5c6026d commit bdfab8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renderer/src/stories/JSONSchemaInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import tippy from "tippy.js";
import { merge } from "./pages/utils";
import { InspectorListItem } from "./preview/inspector/InspectorList";

const isDevelopment = !!import.meta.env
const isDevelopment = !!import.meta.env;

const dateTimeRegex = /(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/;

Expand Down Expand Up @@ -507,15 +507,14 @@ export class JSONSchemaInput extends LitElement {

// Print the default value of the schema if not caught
onUncaughtSchema = (schema) => {

// In development, show uncaught schemas
if (!isDevelopment) {
if (this.form) {
const inputContainer = this.form.shadowRoot.querySelector(`#${this.path.slice(-1)[0]}`);
inputContainer.style.display = "none";
}
}

if (schema.default) return `<pre>${JSON.stringify(schema.default, null, 2)}</pre>`;

const error = new InspectorListItem({
Expand Down

0 comments on commit bdfab8c

Please sign in to comment.