fix(plugins/developer-settings): missing icon in React DevTools error toast

This commit is contained in:
PalmDevs 2025-07-18 02:04:54 +07:00
parent 4670dc0451
commit 5543030b57
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -24,13 +24,6 @@ const events = new TypedEventEmitter<{
errored: [unknown]
}>()
// TODO(PalmDevs): This currently returns undefined because it is ran too early
const CircleXIcon = lookupGeneratedIconComponent(
'CircleXIcon',
'CircleXIcon-secondary',
'CircleXIcon-primary',
)
export function connect() {
if (!RDTContext.active || RDTContext.ws) return
@ -55,7 +48,12 @@ export function connect() {
ToastActionCreators.open({
key: 'REACT_DEVTOOLS_ERROR',
IconComponent: CircleXIcon,
// TODO(PalmDevs): declare this on top of file once asset cache can be loaded earlier
IconComponent: lookupGeneratedIconComponent(
'CircleXIcon',
'CircleXIcon-secondary',
'CircleXIcon-primary',
),
content: err,
})
})