Skip to content

Commit

Permalink
Names
Browse files Browse the repository at this point in the history
  • Loading branch information
stephband committed Oct 20, 2024
1 parent 0586e04 commit be0fb73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/element/create-attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ export function createBooleanAttribute(name) {
}

export function createStringAttribute(name, parse = id) {
return createAttrProp(name, '', (value) => {
return createAttributeProperty(name, '', (value) => {
return value ? parse(value) : '' ;
});
}

export function createNumberAttribute(name, min, max, parse = id) {
return createAttrProp(name, 0, (value) => {
return createAttributeProperty(name, 0, (value) => {
const number = parse(value);

if (Number.isNaN(number)) {
Expand All @@ -81,7 +81,7 @@ export function createNumberAttribute(name, min, max, parse = id) {
}

export function createObjectAttribute(name) {
return createAttrProp(name, null, overload(toType, {
return createAttributeProperty(name, null, overload(toType, {
string: JSON.parse,
object: id,
initial: (value) => {
Expand Down

0 comments on commit be0fb73

Please sign in to comment.