fix: Add error handling to initialization for better debugging
This commit is contained in:
@@ -3107,6 +3107,7 @@ function onMessageSwiped(messageIndex) {
|
||||
* Main initialization function.
|
||||
*/
|
||||
jQuery(async () => {
|
||||
try {
|
||||
loadSettings();
|
||||
await addExtensionSettings();
|
||||
await initUI();
|
||||
@@ -3123,4 +3124,8 @@ jQuery(async () => {
|
||||
eventSource.on(event_types.MESSAGE_SWIPED, onMessageSwiped);
|
||||
|
||||
// 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