Skip to content

Commit

Permalink
Output more debuggable log
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 14, 2023
1 parent fb5f68f commit ce6edd2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion common/Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import {
configs,
collectAncestors,
log,
} from './common.js';
import * as Constants from './constants.js';

Expand All @@ -17,8 +18,10 @@ export class Context {
this.modified = !!modified;
this.withContainer = !!withContainer;

if (mode)
if (mode) {
log('new context, mode=', mode);
this.mode = mode;
}

if (multiselectedTabs)
this.multiselectedTabs = multiselectedTabs;
Expand Down Expand Up @@ -115,6 +118,8 @@ export class Context {
if ('$mode' in this)
return this.$mode;

log('resolving mode, isTreeParent=', this.isTreeParent, ', modified=', this.modified);

return this.$mode = this.isTreeParent ?
(this.modified ?
configs.modeForNoSelectionTreeModified :
Expand Down Expand Up @@ -195,6 +200,8 @@ export class Context {
if (this.shouldCopyAll)
await this.resolveAllTabs();

log('getTabsToCopy mode=', this.mode, ', shouldCopyAll=', this.shouldCopyAll);

this.$tabsToCopy = this.multiselectedTabs.length > 1 ?
this.multiselectedTabs :
this.shouldCopyAll ?
Expand Down

0 comments on commit ce6edd2

Please sign in to comment.