magicoflolis / Userscript-Plus

🐒 Finds available UserJS for the current webpage, the power of Greasy Fork on the go!
https://addons.mozilla.org/firefox/addon/userscript-plus
MIT License
220 stars 21 forks source link

[bug]: Invalid data received from the server #48

Closed neoOpus closed 3 months ago

neoOpus commented 3 months ago

Describe the Bug

data.filter is not a function TypeError: data.filter is not a function at forkFN (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?name=Magic-Userscript%252B-%253A-Show-Site-All-UserJS.user.js&id=fdc1c156-f9ec-4f3d-98ef-5d124c061763:2569:37)

Steps to reproduce the behavior

I changed the userscript after it failed to check and make this error more user-friendly.

const forkFN = async (data) => {
  if (!data || !Array.isArray(data)) {
    MUJS.showError('Invalid data received from the server');
    return;
  }

  // Rest of the function...
};

Browser

Edge (latest)

Type

Userscript

URL

https://www.google.com/

magicoflolis commented 3 months ago

Greasyfork changed some things in the back end of things, I have fixed it. https://github.com/magicoflolis/Userscript-Plus/releases/tag/6.6.2