Skip to content

Commit ac358dc

Browse files
committed
hotfix: added g flag in replaceAll regex
1 parent 294bd7e commit ac358dc

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/config/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ export const copilotAPIKey = process.env.COPILOT_API_KEY || ''
44
export const tasksAppApiKey = process.env.TASKS_API_KEY || ''
55
export const tasksAppId = process.env.TASKS_APP_ID || ''
66

7-
export const apiUrl = `${
8-
process.env.VERCEL_ENV === 'development' ? 'http://' : 'https://'
9-
}${process.env.VERCEL_URL}`
7+
export const apiUrl = 'http://localhost:3000'
108

119
export const SentryConfig = {
1210
DSN: process.env.NEXT_PUBLIC_SENTRY_DSN,

src/utils/safeCompile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Handlebars, { TemplateDelegate } from 'handlebars'
66
* Missing properties resolve to empty string.
77
*/
88
export const safeCompile = (templateSource: string): TemplateDelegate => {
9-
const sanitizedTemplate = templateSource.replaceAll(/{{\s*[\w]+\.\s*}}/, '') // Remove placeholders ending with a dot
9+
const sanitizedTemplate = templateSource.replaceAll(/{{\s*[\w]+\.\s*}}/g, '') // Remove placeholders ending with a dot
1010

1111
Handlebars.registerHelper('helperMissing', () => '')
1212

0 commit comments

Comments
 (0)