Skip to content

Commit

Permalink
fix(vue-next): fix remove attr not update
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Aug 19, 2024
1 parent 292f7c4 commit f4a7c2c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions driver/js/packages/hippy-vue-next/src/modules/attrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export function patchAttr(
nextValue: NeedToTyped,
): void {
// set attr when next value is not equal before value
if (nextValue === null) {
el.removeAttribute(key);
} else if (prevValue !== nextValue) {
if (prevValue !== nextValue) {
el.setAttribute(key, nextValue);
}
}

0 comments on commit f4a7c2c

Please sign in to comment.