web: Rename lastLoaded to nativeConstructor
This commit is contained in:
parent
a9db2584c8
commit
307f9bc820
|
@ -115,7 +115,7 @@ type Ruffle =
|
||||||
| (typeof import("../dist/ruffle_web"))["Ruffle"]
|
| (typeof import("../dist/ruffle_web"))["Ruffle"]
|
||||||
| (typeof import("../dist/ruffle_web-wasm_extensions"))["Ruffle"];
|
| (typeof import("../dist/ruffle_web-wasm_extensions"))["Ruffle"];
|
||||||
|
|
||||||
let lastLoaded: Promise<Ruffle> | null = null;
|
let nativeConstructor: Promise<Ruffle> | null = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain an instance of `Ruffle`.
|
* Obtain an instance of `Ruffle`.
|
||||||
|
@ -131,9 +131,9 @@ export function loadRuffle(
|
||||||
config: BaseLoadOptions,
|
config: BaseLoadOptions,
|
||||||
progressCallback?: ProgressCallback,
|
progressCallback?: ProgressCallback,
|
||||||
): Promise<Ruffle> {
|
): Promise<Ruffle> {
|
||||||
if (lastLoaded === null) {
|
if (nativeConstructor === null) {
|
||||||
lastLoaded = fetchRuffle(config, progressCallback);
|
nativeConstructor = fetchRuffle(config, progressCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return lastLoaded;
|
return nativeConstructor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue