Skip to content

Commit

Permalink
fix: adding snippet overwrites whole snippets file
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual-designer authored Aug 29, 2022
1 parent 8a508a3 commit 75c0c99
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/services/SnippetManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ export default class SnippetManager extends Service {
}

set(guildID: string, name: string, content: string, files: string[] = []): void {
if (!this.snippets[guildID]) {
this.snippets[guildID] = [];
}

this.snippets[guildID].push({
name,
content,
Expand Down Expand Up @@ -120,4 +116,4 @@ export default class SnippetManager extends Service {
}
}
}
}
}

0 comments on commit 75c0c99

Please sign in to comment.