File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,16 @@ function init(options: InitOptions): OnboardAPI {
92
92
connect
93
93
} = options
94
94
95
+ const { device, svelteInstance } = configuration
96
+
97
+ if ( svelteInstance ) {
98
+ // if already initialized, need to cleanup old instance
99
+ console . warn ( 'Re-initializing Onboard and resetting back to initial state' )
100
+ reset$ . next ( )
101
+ }
102
+
95
103
initI18N ( i18n )
96
104
addChains ( chainIdToHex ( chains ) )
97
- const { device, svelteInstance } = configuration
98
105
99
106
if ( typeof connect !== undefined ) {
100
107
updateConnectModal ( connect )
@@ -193,12 +200,6 @@ function init(options: InitOptions): OnboardAPI {
193
200
updateNotify ( notifyUpdate )
194
201
}
195
202
196
- if ( svelteInstance ) {
197
- // if already initialized, need to cleanup old instance
198
- console . warn ( 'Re-initializing Onboard and resetting back to initial state' )
199
- reset$ . next ( )
200
- }
201
-
202
203
const app = svelteInstance || mountApp ( )
203
204
204
205
updateConfiguration ( {
You can’t perform that action at this time.
0 commit comments