fix(plugins/developer-kit): move IconComponent lookup outside function
This commit is contained in:
parent
50a3804709
commit
68b84ea203
1 changed files with 7 additions and 6 deletions
|
|
@ -24,6 +24,12 @@ const events = new TypedEventEmitter<{
|
|||
errored: [unknown]
|
||||
}>()
|
||||
|
||||
const CircleXIcon = lookupGeneratedIconComponent(
|
||||
'CircleXIcon',
|
||||
'CircleXIcon-secondary',
|
||||
'CircleXIcon-primary',
|
||||
)
|
||||
|
||||
export function connect() {
|
||||
if (!RDTContext.active || RDTContext.ws) return
|
||||
|
||||
|
|
@ -48,12 +54,7 @@ export function connect() {
|
|||
|
||||
ToastActionCreators.open({
|
||||
key: 'REACT_DEVTOOLS_ERROR',
|
||||
// TODO(PalmDevs): declare this on top of file once asset cache can be loaded earlier
|
||||
IconComponent: lookupGeneratedIconComponent(
|
||||
'CircleXIcon',
|
||||
'CircleXIcon-secondary',
|
||||
'CircleXIcon-primary',
|
||||
),
|
||||
IconComponent: CircleXIcon,
|
||||
content: err,
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue