Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurankv committed Feb 23, 2024
1 parent 4eb4876 commit c2242f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions main.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ const settingsUpdaters: Record<string,(settings: CodeStylerSettings)=>CodeStyler
"1.0.7": settingsPreserve,
"1.0.8": settingsPreserve,
"1.0.9": settingsPreserve,
"1.0.10": (settings)=>settingsVersionUpdate(settings,(theme)=>{
"1.0.10": (settings)=>settingsVersionUpdate(settings,(theme)=>{ // To 1.0.10
theme.settings.inline.style = true;
return theme;
},(settings)=>{//@ts-expect-error Older interface versions
Expand All @@ -692,8 +692,7 @@ const settingsUpdaters: Record<string,(settings: CodeStylerSettings)=>CodeStyler
"1.1.1": settingsPreserve,
"1.1.2": settingsPreserve,
"1.1.3": settingsPreserve,
"1.1.4": settingsPreserve,
"1.1.5": (settings) => settingsVersionUpdate(settings,(theme)=>{
"1.1.4": (settings) => settingsVersionUpdate(settings,(theme)=>{ // To 1.1.5
theme.settings.header.externalReference = structuredClone(THEME_DEFAULT_SETTINGS.header.externalReference);
theme.colours.light.header.externalReference = structuredClone(THEME_FALLBACK_COLOURS.header.externalReference);
theme.colours.dark.header.externalReference = structuredClone(THEME_FALLBACK_COLOURS.header.externalReference);
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class CodeStylerPlugin extends Plugin {
}

async loadSettings(): Promise<void> {
this.settings = {...structuredClone(DEFAULT_SETTINGS), ...convertSettings(await this.loadData())};
this.settings = { ...structuredClone(DEFAULT_SETTINGS), ...convertSettings(await this.loadData()) };
}

async saveSettings(): Promise<void> {
Expand Down

0 comments on commit c2242f1

Please sign in to comment.