Skip to content

Commit

Permalink
[Fix] escapeStringForJson in diffusers snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 committed Sep 20, 2024
1 parent 106398a commit 3616bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function nameWithoutNamespace(modelId: string): string {
return splitted.length === 1 ? splitted[0] : splitted[1];
}

const escapeStringForJson = (str: string): string => JSON.stringify(str);
const escapeStringForJson = (str: string): string => JSON.stringify(str).slice(1, -1); // slice is needed to remove surrounding quotes added by JSON.stringify

//#region snippets

Expand Down

0 comments on commit 3616bfd

Please sign in to comment.