Skip to content

Commit 24fd3a0

Browse files
Add debugging for props.app
1 parent bbec0d5 commit 24fd3a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

kernel/src/components/Dialog.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ export class Dialog {
4848
// create an arrow function that calls the save method on the serviceContainer but first iterates over all cells and gathers their code content if they are code cells
4949
async () => {
5050
// TODO: current widget might not be correct at this level, need to check and possibly change how we're getting this
51+
console.log("[Dialog] saveCard: props.app =", JSON.parse(JSON.stringify(props.app, (key, value) => {
52+
// Avoid circular references and functions
53+
if (typeof value === 'function') return '[Function]';
54+
if (typeof value === 'object' && value !== null) {
55+
if (value instanceof HTMLElement) return '[HTMLElement]';
56+
if (value instanceof Map) return '[Map]';
57+
if (value instanceof Set) return '[Set]';
58+
}
59+
return value;
60+
})));
5161
const notebook = (props.app.shell as any).currentWidget as NotebookPanel | null;
5262
var allCellContent : string = '';
5363

0 commit comments

Comments
 (0)