Allow errored views to be reloaded

This commit is contained in:
Max Goodhart
2020-06-19 19:19:37 -07:00
parent 490b626a06
commit 570b07ed1e
4 changed files with 15 additions and 21 deletions

View File

@@ -180,8 +180,7 @@ export default class StreamWindow extends EventEmitter {
reloadView(viewIdx) {
const view = this.views.find(
(v) =>
v.state.matches('displaying') &&
v.state.context.pos.spaces.includes(viewIdx),
v.state.context.pos && v.state.context.pos.spaces.includes(viewIdx),
)
if (view) {
view.send('RELOAD')