do not load ruffle multiple times!
This commit is contained in:
parent
6b250762f0
commit
87903fbf6d
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in New Issue