Skip to content

Commit

Permalink
minor adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
ECorreia45 committed Nov 27, 2024
1 parent 992f168 commit afeef88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ export function handleElementAttribute(
return
}

const hasFunctionValue = values.some((d) => typeof d === 'function')

if (booleanAttributes[name]) {
const d = values[0]

Expand Down Expand Up @@ -305,7 +303,7 @@ export function handleElementAttribute(
return newValue
}

if (hasFunctionValue) {
if (values.some((d) => typeof d === 'function')) {
return cb(effect(setAttr))
}

Expand Down
6 changes: 3 additions & 3 deletions src/utils/is-object-literal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const isObjectLiteral = (val: unknown) => {
return (
return Boolean(
val &&
typeof val === 'object' &&
Object.getPrototypeOf(val) === Object.prototype
typeof val === 'object' &&
Object.getPrototypeOf(val) === Object.prototype
)
}

0 comments on commit afeef88

Please sign in to comment.