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 Feb 26, 2024
1 parent 83069cb commit 52059a3
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,17 @@ export class GuidedMetadataPage extends ManagedPage {
if (path[0] === "Ophys") {
const name = path.slice(-1)[0];

if (isPatternProperties) return schema.minItems = schema.maxItems = Object.values(resolveFromPath(path, results)).length
if (isPatternProperties)
return (schema.minItems = schema.maxItems =
Object.values(resolveFromPath(path, results)).length);

if (schema.type === "array") {
if (
name !== "Device" &&
target
) {
if (name in target) schema.minItems = schema.maxItems = target[name].length // Skip unresolved deep in pattern propertie)

if (name !== "Device" && target) {
if (name in target)
schema.minItems = schema.maxItems = target[name].length; // Skip unresolved deep in pattern propertie)

Check failure on line 208 in src/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js

View workflow job for this annotation

GitHub Actions / Check for spelling errors

propertie ==> property, properties
// Remove Ophys requirements if left initially undefined
else if (parentSchema.required.includes(name)) parentSchema.required = parentSchema.required.filter((n) => n !== name);
else if (parentSchema.required.includes(name))
parentSchema.required = parentSchema.required.filter((n) => n !== name);
}
}
}
Expand Down

0 comments on commit 52059a3

Please sign in to comment.