Browse Source
Merge pull request #2442 from mslourens/support_replace_all_older_browsers
Replace 'replaceAll' with 'replace' and a regular expression
gh-pages
Martin McKeaveney
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte
-
packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte
-
packages/builder/src/components/design/PropertiesPanel/ScreenSettingsSection.svelte
|
|
|
@ -58,7 +58,7 @@ |
|
|
|
// By deleting all _rev properties we can avoid this and increase |
|
|
|
// performance. |
|
|
|
$: json = JSON.stringify(previewData) |
|
|
|
$: strippedJson = json.replaceAll(/"_rev":\s*"[^"]+"/g, `"_rev":""`) |
|
|
|
$: strippedJson = json.replace(/"_rev":\s*"[^"]+"/g, `"_rev":""`) |
|
|
|
|
|
|
|
// Update the iframe with the builder info to render the correct preview |
|
|
|
const refreshContent = message => { |
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ |
|
|
|
if (!event.detail.startsWith("/")) { |
|
|
|
route = "/" + event.detail |
|
|
|
} |
|
|
|
route = route.replaceAll(" ", "-") |
|
|
|
route = route.replace(/ +/g, "-") |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
key: "routing.route", |
|
|
|
label: "Route", |
|
|
|
control: Input, |
|
|
|
parser: val => val.replaceAll(" ", "-"), |
|
|
|
parser: val => val.replace(/ +/g, "-"), |
|
|
|
}, |
|
|
|
{ key: "routing.roleId", label: "Access", control: RoleSelect }, |
|
|
|
{ key: "layoutId", label: "Layout", control: LayoutSelect }, |
|
|
|
|