MCPcopy Create free account
hub / github.com/facebook/Rapid / initAsync

Method initAsync

modules/core/UploaderSystem.js:66–81  ·  view source on GitHub ↗

* initAsync * Called after all core objects have been constructed. * @return {Promise} Promise resolved when this component has completed initialization

()

Source from the content-addressed store, hash-verified

64 * @return {Promise} Promise resolved when this component has completed initialization
65 */
66 initAsync() {
67 if (this._initPromise) return this._initPromise;
68
69 for (const id of this.dependencies) {
70 if (!this.context.systems[id]) {
71 return Promise.reject(`Cannot init: ${this.id} requires ${id}`);
72 }
73 }
74
75 const assets = this.context.systems.assets;
76 const prerequisites = assets.initAsync();
77
78 return this._initPromise = prerequisites
79 .then(() => assets.loadAssetAsync('tagging_discarded'))
80 .then(d => this._discardTags = d);
81 }
82
83
84 /**

Callers

nothing calls this directly

Calls 1

loadAssetAsyncMethod · 0.80

Tested by

no test coverage detected