Skip to content

Commit

Permalink
refactor: optimize judgment conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbfcd committed Jun 17, 2022
1 parent eb07f64 commit be6e01e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/million/createElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ export const createElement = (vnode?: VNode | null, attachField = true): DOMNode
}
} else if (
el[propName] !== undefined &&
el[propName] !== null &&
!(el instanceof SVGElement) &&
propName !== 'list' &&
propName !== 'form' &&
propName in el
) {
el[propName] = propValue;
Expand Down
3 changes: 1 addition & 2 deletions src/million/drivers/useProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export const updateProp = (
}
} else if (
el[propName] !== undefined &&
el[propName] !== null &&
!(el instanceof SVGElement) &&
propName !== 'list' &&
propName !== 'form' &&
propName in el
) {
if (newPropValue) {
Expand Down

0 comments on commit be6e01e

Please sign in to comment.