Skip to content

Commit

Permalink
fix: fix 0 * Infinity is NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Nov 7, 2024
1 parent 6b8db09 commit 308a8a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/form/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "schemastery-vue",
"description": "Type driven schema validator",
"version": "7.3.6",
"version": "7.3.7",
"main": "src/index.ts",
"files": [
"src"
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/schema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const SchemaComponent = computed(() => {
const valid = isNullable(props.modelValue) && !ext.important || ext.validate(props.modelValue, props.schema)
if (!valid) return
}
return [ext.component, +!!ext.type + +!!ext.role + +ext.important * Infinity] as const
return [ext.component, +!!ext.type + +!!ext.role + (ext.important ? Infinity : 0)] as const
}).filter(Boolean).sort((a, b) => b[1] - a[1])
candidates.push([SchemaBase, 0])
return candidates[0][0]
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './menu.scss';
@use './menu.scss';

.k-schema-item {
position: relative;
Expand Down

0 comments on commit 308a8a8

Please sign in to comment.