fixes in closing tabs and elsewhere

This commit is contained in:
zadam
2020-02-09 21:13:05 +01:00
parent 4401a8e1e8
commit 826c434630
15 changed files with 94 additions and 83 deletions

View File

@@ -12,13 +12,12 @@ import hoistedNoteService from "./hoisted_note.js";
class TabContext extends Component {
/**
* @param {AppContext} appContext
* @param {object} state
* @param {string|null} tabId
*/
constructor(appContext, state = {}) {
constructor(appContext, tabId = null) {
super(appContext);
this.tabId = state.tabId || utils.randomString(4);
this.state = state;
this.tabId = tabId || utils.randomString(4);
this.trigger('newTabOpened', {tabId: this.tabId});
}