mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-18 14:04:17 +08:00
hide __nonStructural members from the default config (fixes #2004)
This commit is contained in:
parent
742affb88b
commit
964e0ad2bc
@ -125,7 +125,22 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
getDefaults () {
|
||||
return this.defaults
|
||||
const cleanup = o => {
|
||||
if (o instanceof Array) {
|
||||
return o.map(cleanup)
|
||||
} else if (o instanceof Object) {
|
||||
const r = {}
|
||||
for (const k of Object.keys(o)) {
|
||||
if (k !== '__nonStructural') {
|
||||
r[k] = cleanup(o[k])
|
||||
}
|
||||
}
|
||||
return r
|
||||
} else {
|
||||
return o
|
||||
}
|
||||
}
|
||||
return cleanup(this.defaults)
|
||||
}
|
||||
|
||||
load (): void {
|
||||
|
Loading…
Reference in New Issue
Block a user