MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/views/modal/ModelModal.js:26–41  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

24 }
25
26 constructor (options = {}) {
27 super(options)
28 this.models = options.models || []
29 const result = []
30 for (const model of Array.from(this.models)) {
31 if (!model.loaded) {
32 this.supermodel.loadModel(model)
33 result.push(model.fetch({
34 cache: false,
35 error (error) {
36 return console.log('Error loading', model, error)
37 }
38 }))
39 }
40 }
41 }
42
43 afterRender () {
44 if (!this.supermodel.finished()) { return }

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.45

Tested by

no test coverage detected