Skip to content

Commit e8777c8

Browse files
committed
chore: code style
1 parent 8a7cb9f commit e8777c8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/utils/commonUtils.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export function resolveOnChange<
5555
}
5656

5757
// Trigger by composition event, this means we need force change the input value
58-
if (target.type != 'file' && targetValue !== undefined) {
58+
// https://github.com/ant-design/ant-design/issues/45737
59+
// https://github.com/ant-design/ant-design/issues/46598
60+
if (target.type !== 'file' && targetValue !== undefined) {
5961
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
6062
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
6163
// https://bugs.webkit.org/show_bug.cgi?id=28123
@@ -65,11 +67,7 @@ export function resolveOnChange<
6567
target: { value: currentTarget },
6668
currentTarget: { value: currentTarget },
6769
});
68-
// https://github.com/ant-design/ant-design/issues/45737
69-
// 'file' check move to above
70-
// if (currentTarget.type !== 'file') {
7170
currentTarget.value = targetValue;
72-
// }
7371
onChange(event as React.ChangeEvent<E>);
7472
return;
7573
}

0 commit comments

Comments
 (0)