We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i'm trying to do a frontend with react using booru, but every time i try to make the search, it gives the error:
Constants.js:24 Uncaught (in promise) BooruError: Failed to execute 'fetch' on 'Window': Illegal invocation at Booru.search (http://localhost:3000/static/js/0.chunk.js:543:13)
there is the code, sorry for some words being in portuguese:
import React from "react"; import { search } from "booru"; import "./Main.css"; export default function Main() { let tmpTags; let tags; let listOfLinks; let posts; async function handleSubmit() { tags = tmpTags.split(); console.log(tags); listOfLinks = []; posts = await search("rule34", tags, { limit: 1, random: true }); console.log(posts) for (let post of posts) { await listOfLinks.push(String(post.fileUrl)); } console.log(tags); } return ( <div className="main-container"> <h1 className="titulo">Booru Pack Downloader</h1> <input className="barra-de-pesquisa" value={tmpTags} placeholder="Quais tags você quer pesquisar?" onChange={e => (tmpTags = e.target.value)} /> <button className="botão-de-pesquisa" onClick={handleSubmit}> pesquisar </button> </div> ); }
The text was updated successfully, but these errors were encountered:
Possible fix for #35 (illegal invocation)
32bb7ec
Seems to be an issue related to how webpack bundles code up (see developit/unfetch#46 and orbitjs/orbit#452)
booru isn't officially supported on browsers, but I've put out a (possible) fix at https://github.com/AtlasTheBot/booru/tree/fix/%2335-illegal-invocation
Try using that and see if it's fixed
Sorry, something went wrong.
f1c0c00
Merge pull request #52 from AtlasTheBot/fix/#35-illegal-invocation
ecbbba5
Fix/#35 illegal invocation
AtoraSuunva
No branches or pull requests
i'm trying to do a frontend with react using booru, but every time i try to make the search, it gives the error:
Constants.js:24 Uncaught (in promise) BooruError: Failed to execute 'fetch' on 'Window': Illegal invocation at Booru.search (http://localhost:3000/static/js/0.chunk.js:543:13)
there is the code, sorry for some words being in portuguese:
The text was updated successfully, but these errors were encountered: