Merge pull request #762 from directus/fix-750

Replace `replaceAll` with `replace`
This commit is contained in:
Rijk van Zanten
2020-10-22 20:18:12 +02:00
committed by GitHub
4 changed files with 8 additions and 11 deletions

View File

@@ -263,7 +263,7 @@ export default defineComponent({
if (part.startsWith('{{') === false) {
return `<span class="text">${part}</span>`;
}
const fieldKey = part.replaceAll(/({|})/g, '').trim();
const fieldKey = part.replace(/({|})/g, '').trim();
const field = findTree(tree.value, fieldKey.split('.'));
if (!field) return '';