mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
changed replace to global replace
This commit is contained in:
@@ -32,7 +32,8 @@ const multiMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const regexTestMap = {
|
const regexTestMap = {
|
||||||
'foolbar.baz': [test]
|
'foolbar.baz': [test],
|
||||||
|
'foo.bard': [test],
|
||||||
};
|
};
|
||||||
|
|
||||||
const multiViewModelList = [
|
const multiViewModelList = [
|
||||||
|
@@ -156,7 +156,7 @@ export class Metadata {
|
|||||||
const outputKeys: string[] = [];
|
const outputKeys: string[] = [];
|
||||||
for (const inputKey of inputKeys) {
|
for (const inputKey of inputKeys) {
|
||||||
if (inputKey.includes('*')) {
|
if (inputKey.includes('*')) {
|
||||||
const inputKeyRegex = new RegExp('^' + inputKey.replace('.', '\\.').replace('*', '.*') + '$');
|
const inputKeyRegex = new RegExp('^' + inputKey.replace(/\./g, '\\.').replace('*', '.*') + '$');
|
||||||
for (const mapKey of Object.keys(mdMap)) {
|
for (const mapKey of Object.keys(mdMap)) {
|
||||||
if (!outputKeys.includes(mapKey) && inputKeyRegex.test(mapKey)) {
|
if (!outputKeys.includes(mapKey) && inputKeyRegex.test(mapKey)) {
|
||||||
outputKeys.push(mapKey);
|
outputKeys.push(mapKey);
|
||||||
|
Reference in New Issue
Block a user