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

Method afterRender

app/views/core/ModalComponent.js:22–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 afterRender () {
23 if (this.vueComponent) {
24 return this.$el.find('#modal-base-flat').replaceWith(this.vueComponent.$el)
25 // TODO: should we call super() here?
26 } else {
27 if (this.vuexModule) {
28 if (!_.isFunction(this.vuexModule)) {
29 throw new Error('@vuexModule should be a function')
30 }
31 store.registerModule('modal', this.vuexModule())
32 }
33
34 this.vueComponent = new this.VueComponent({
35 el: this.$el.find('#modal-base-flat')[0],
36 propsData: this.propsData,
37 store
38 })
39
40 return super.afterRender(...arguments)
41 }
42 }
43
44 destroy () {
45 if (this.vuexModule) {

Callers

nothing calls this directly

Calls 1

vuexModuleMethod · 0.80

Tested by

no test coverage detected