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

Function addModal

app/core/store/modules/modals.js:7–13  ·  view source on GitHub ↗
(state, modal)

Source from the content-addressed store, hash-verified

5 },
6 mutations: {
7 addModal (state, modal) {
8 const index = state.modals.findIndex(m => m.name === modal.name)
9 if (index === -1) {
10 state.modals.push(modal)
11 state.modals.sort((a, b) => b.priority - a.priority)
12 }
13 },
14 removeModal (state, modalName) {
15 const index = state.modals.findIndex(m => m.name === modalName)
16 if (index !== -1) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected