rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
147 stars 23 forks source link

TypeErrorr: item.url is Null - Multi Manger custom export on Invite only links #1733

Open Daraan opened 3 years ago

Daraan commented 3 years ago

When using the custom export feature on invite only links, the item.url is Null and this line fails

https://github.com/rafaelgomesxyz/esgst/blob/1fa19ecf17d5e484c3d4db077fe5b886f0399881/src/modules/General/MultiManager.jsx#L1153

.replace(
        /\[URL]/gi,
        `https://www.steamgifts.com${item.url.match(/\/giveaway\/.+/)[0]}`
    )

Could this be a fix? Line 1106 Or some other way to ensure it is not null when items are created.

                    } else if (item.inviteOnly) {
                        type += 'Invite Only';
                        if (item.regionRestricted) {
                            type += 'Region Restricted';
                        }
                        // setting to empty string for fix?
                        if (item.url === null) {
                            item.url = ''
                        }

Thank you