diff --git a/src/lib/wizards/functions/steps/templatePermissions.svelte b/src/lib/wizards/functions/steps/templatePermissions.svelte index d72be2f79..116fbf068 100644 --- a/src/lib/wizards/functions/steps/templatePermissions.svelte +++ b/src/lib/wizards/functions/steps/templatePermissions.svelte @@ -10,7 +10,10 @@ onMount(() => { $templateConfig.execute = $template.permissions.includes('any'); templateScopes = scopes - .filter((scope) => $template.scopes.includes(scope.scope)) + // hot fix for perplexity chat templates, + // backend doesn't have scopes for this template. + // TODO: @itznotabug fix on backend too. + .filter((scope) => ($template.scopes ?? []).includes(scope.scope)) .map((scope) => ({ ...scope, active: true