(id: UniqueId)
| 186 | } |
| 187 | |
| 188 | public getPanel(id: UniqueId): IPanelItem<any> | undefined { |
| 189 | const { data = [] } = this.state; |
| 190 | return cloneDeepWith(data.find(searchById(id)), (value) => { |
| 191 | // prevent the browser from OOM |
| 192 | // because when cloneDeep the StandaloneEditor class, it'll get infinity loop in |
| 193 | // https://unpkg.com/monaco-editor@0.23.0/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js#L398 |
| 194 | // class PieceTreeBase.getOffsetAt.while |
| 195 | if ( |
| 196 | value && |
| 197 | typeof value === 'object' && |
| 198 | value instanceof StandaloneEditor |
| 199 | ) { |
| 200 | return value; |
| 201 | } |
| 202 | }); |
| 203 | } |
| 204 | |
| 205 | public getOutputValue() { |
| 206 | const { PANEL_OUTPUT = '' } = this.builtinService.getConstants(); |
no test coverage detected