(topic, id)
| 65 | } |
| 66 | |
| 67 | removeModal (topic, id) { |
| 68 | let props; |
| 69 | if (!id) { |
| 70 | props = modals.pop(); |
| 71 | } else { |
| 72 | modals.forEach((m, i) => { |
| 73 | if (m.id === id) { |
| 74 | props = modals.splice(i, 1); |
| 75 | } |
| 76 | }); |
| 77 | } |
| 78 | |
| 79 | if (!props) { |
| 80 | return; |
| 81 | } |
| 82 | |
| 83 | if (props.onClose) { |
| 84 | props.onClose(); |
| 85 | } |
| 86 | this.setState({ modals, increase: false }); |
| 87 | |
| 88 | if (modals.length === 0) { |
| 89 | document.body.style.height = ''; |
| 90 | document.body.style.overflow = ''; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | close () { |
| 95 | PubSub.publish(REMOVE_MODAL); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…