fix: Add error handling to initialization for better debugging
This commit is contained in:
@@ -3107,6 +3107,7 @@ function onMessageSwiped(messageIndex) {
|
|||||||
* Main initialization function.
|
* Main initialization function.
|
||||||
*/
|
*/
|
||||||
jQuery(async () => {
|
jQuery(async () => {
|
||||||
|
try {
|
||||||
loadSettings();
|
loadSettings();
|
||||||
await addExtensionSettings();
|
await addExtensionSettings();
|
||||||
await initUI();
|
await initUI();
|
||||||
@@ -3123,4 +3124,8 @@ jQuery(async () => {
|
|||||||
eventSource.on(event_types.MESSAGE_SWIPED, onMessageSwiped);
|
eventSource.on(event_types.MESSAGE_SWIPED, onMessageSwiped);
|
||||||
|
|
||||||
// console.log('[RPG Companion] Extension loaded successfully');
|
// console.log('[RPG Companion] Extension loaded successfully');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[RPG Companion] Failed to initialize:', error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user