Swaf export regexp: remove unnecessary escapements

This commit is contained in:
Alice Gaudon 2021-05-31 11:18:04 +02:00
parent a85d899a21
commit 166d1c1458

View File

@ -200,7 +200,7 @@ export default class SvelteViewEngine extends ViewEngine {
logger.info(canonicalName + ' > ', 'Replacing backend calls'); logger.info(canonicalName + ' > ', 'Replacing backend calls');
// Skip replace if there is no swaf export // Skip replace if there is no swaf export
if (!code.match(/import[ \n]+\{[ \n]*locals[ \n]*\}[ \n]+from[ \n]+["'](\.\.\/)+ts\/stores(\.js)?["']/)) { if (!code.match(/import[ \n]+{[ \n]*locals[ \n]*}[ \n]+from[ \n]+["'](\.\.\/)+ts\/stores(\.js)?["']/)) {
return { return {
backendCalls: [], backendCalls: [],
code: code, code: code,