Pandiora / SteamAccountRoboticAssistant

Chrome-Extension for enhancing and automating your Steam-Experience
Apache License 2.0
37 stars 8 forks source link

Uncaught (in promise) TypeError: Cannot read property 'market' of undefined #31

Open GhostDog98 opened 3 years ago

GhostDog98 commented 3 years ago

Upon attempting to load the unpacked extension, it doesn't pop up with the settings and api request when you first go to the page, when viewing the extensions errors, the following is displayed:

Uncaught (in promise) TypeError: Cannot read property 'market' of undefined Context: index.html Stack Trace: js/mainNotifications.js:56 (anonymous function) Chrome version: Version 87.0.4280.88 (Official Build) (64-bit)

    const addNotifications = async() => {

        let notifications = await browser.storage.local.get('notifications');
            notifications = notifications.notifications;

        $('#market').html(notifications.market.join('')); <--------- HIGHLIGHTED ERROR
        $('#trades').html(notifications.trades.join(''));
        $('#gifts').html(notifications.gifts.join(''));

        updateNotiCount('#notifications');

        return notifications;
    };