You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then use loadStrings function and attempt to load them.
Without second assets 'assets/data.json', it works. But with it, causes error.
I saw that second assets's path(encoded) starts with 'assets/'.
Isn't is something related with the error?
Thank you.
file#0 = blob:https://editor.p5js.org/61b30737-c1cc-4d6c-a210-c0de8fba7567
file#1 = assets/blob:https://editor.p5js.org/61b30737-c1cc-4d6c-a210-c0de8fba7567
file#2 = blob:https://editor.p5js.org/4ed556dc-2c7d-4f04-a746-84edbf1f22c6
> p5.js says: It looks like there was a problem loading your text file. Try checking if the file path [Error: [object ReadableStream]] is correct, or running a local server.[https://github.com/processing/p5.js/wiki/Local-server]
The text was updated successfully, but these errors were encountered:
So the problem lies with the regex and replace() in resolveJSLinksInString in PreviewFrames.jsx. If there are two files with the same name, even with different paths, the first pass would replace both their names in the original code with the blob url of the first file.
I will fix this and create a PR soon.
Maybe I can fix #1205 too.
akshay-99
added a commit
to akshay-99/p5.js-web-editor
that referenced
this issue
Feb 23, 2020
Fix the regex check so as to perform the
replace when the path matches exactly.
For e.g. A pass looking for 'data.json' won't
affect 'assets/data.json' or '/data.json'.
They will be handled separately in their own passes.
Nature of issue?
Details about the bug:
I create three assets as follows.
https://editor.p5js.org/kazuhikoarase/sketches/dC8lEP02D
Then use loadStrings function and attempt to load them.
Without second assets 'assets/data.json', it works. But with it, causes error.
I saw that second assets's path(encoded) starts with 'assets/'.
Isn't is something related with the error?
Thank you.
The text was updated successfully, but these errors were encountered: