refactor & perf: import { noop } from 'lodash-es' across web (#17439)

This commit is contained in:
yusheng chen
2025-04-06 17:56:08 +08:00
committed by GitHub
parent 7016ccef10
commit c05e03fc09
87 changed files with 271 additions and 184 deletions

View File

@@ -39,6 +39,7 @@ import { marketplaceApiPrefix } from '@/config'
import { SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS } from '@/config'
import { LanguagesSupported } from '@/i18n/language'
import I18n from '@/context/i18n'
import { noop } from 'lodash-es'
const PACKAGE_IDS_KEY = 'package-ids'
const BUNDLE_INFO_KEY = 'bundle-info'
@@ -230,8 +231,8 @@ const PluginPage = ({
{currentFile && (
<InstallFromLocalPackage
file={currentFile}
onClose={removeFile ?? (() => { })}
onSuccess={() => { }}
onClose={removeFile ?? noop}
onSuccess={noop}
/>
)}
<input
@@ -240,7 +241,7 @@ const PluginPage = ({
type="file"
id="fileUploader"
accept={SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS}
onChange={fileChangeHandle ?? (() => { })}
onChange={fileChangeHandle ?? noop}
/>
</>
)}