Skip to content
Snippets Groups Projects
Commit 87903fbf authored by HJ's avatar HJ :fire:
Browse files

do not load ruffle multiple times!

parent 6b250762
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,10 @@ const createRuffleService = () => {
let ruffleInstance = null
const getRuffle = () => new Promise((resolve, reject) => {
if (ruffleInstance) resolve(ruffleInstance)
if (ruffleInstance) {
resolve(ruffleInstance)
return
}
// Ruffle needs these to be set before it's loaded
// https://github.com/ruffle-rs/ruffle/issues/3952
window.RufflePlayer = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment