Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 8d07782

Browse files
committed
Merge branch '738-bug-db-folder-saving-to-frontmatter-even-if-persisting-is-off'
2 parents 8a5ebce + fc2e69e commit 8d07782

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

src/cdm/FolderModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface ConfigColumn {
5050
task_hide_completed?: boolean;
5151
// Formulas
5252
formula_query?: string;
53-
persist_formula?: boolean;
53+
persist_formula: boolean;
5454
// Relations
5555
related_note_path?: string;
5656
// Rollups

src/helpers/Constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export const DEFAULT_COLUMN_CONFIG: ConfigColumn = Object.freeze({
121121
isInline: false,
122122
task_hide_completed: true,
123123
footer_type: FooterType.NONE,
124+
persist_formula: false,
124125
});
125126

126127
export const MetadataDatabaseColumns: MetadataColumnsModel = Object.freeze({

src/parsers/handlers/marshall/MarshallColumnsHandler.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ export class MarshallColumnsHandler extends AbstractYamlHandler {
5555
column.config = DEFAULT_COLUMN_CONFIG;
5656
} else {
5757
// General config
58-
const parsedIsInline: boolean = this.parseBoolean(column.config.isInline);
59-
column.config.isInline = parsedIsInline;
58+
column.config = {
59+
...DEFAULT_COLUMN_CONFIG,
60+
...column.config
61+
}
62+
63+
column.config.isInline = this.parseBoolean(column.config.isInline);
6064
column = this.marshallParticularConfigInfo(column);
6165
}
6266
// Update mashaller response

src/services/Logger.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Log implements LogInterface {
2626
private constructor() {
2727
this.isDebugModeEnabled = false;
2828
this.levelInfo = 0;
29+
this.configureLogger();
30+
2931
}
3032

3133
public setDebugMode(isDebugModeEnabled: boolean) {
@@ -41,31 +43,31 @@ class Log implements LogInterface {
4143

4244
private configureLogger() {
4345
if (this.levelInfo >= LevelInfoRecord.debug && this.isDebugModeEnabled) {
44-
this.debug = console.log.bind(window.console, `[DEBUG]`);
46+
this.debug = console.log.bind(console, `[DEBUG]`);
4547
} else {
4648
this.debug = () => {
4749
// Disable debug mode
4850
};
4951
}
5052

5153
if (this.levelInfo >= LevelInfoRecord.info && this.isDebugModeEnabled) {
52-
this.info = console.log.bind(window.console, `[INFO]`);
54+
this.info = console.log.bind(console, `[INFO]`);
5355
} else {
5456
this.info = () => {
5557
// Disable info mode
5658
};
5759
}
5860

5961
if (this.levelInfo >= LevelInfoRecord.warn && this.isDebugModeEnabled) {
60-
this.warn = console.log.bind(window.console, `[WARN]`);
62+
this.warn = console.log.bind(console, `[WARN]`);
6163
} else {
6264
this.warn = () => {
6365
// Disable warn mode
6466
};
6567
}
6668

6769
if (this.levelInfo >= LevelInfoRecord.error && this.isDebugModeEnabled) {
68-
this.error = console.log.bind(window.console, `[ERROR]`);
70+
this.error = console.log.bind(console, `[ERROR]`);
6971
} else {
7072
this.error = () => {
7173
// Disable error mode

0 commit comments

Comments
 (0)