diff --git a/modules/ui/commit.js b/modules/ui/commit.js index 0e5ffc75d..b3681d602 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -12,11 +12,11 @@ import { utilRebind } from '../util'; var changeset; var readOnlyTags = [ - 'changesets_count', - 'created_by', - 'imagery_used', - 'host', - 'locale' + /^changesets_count$/, + /^created_by$/, + /^imagery_used$/, + /^host$/, + /^locale$/ ]; diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index c3bbb4f8a..2991895d6 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -175,7 +175,12 @@ export function uiRawTagEditor(context) { function isReadOnly(d) { - return readOnlyTags.indexOf(d.key) !== -1; + for (var i = 0; i < readOnlyTags.length; i++) { + if (d.key.match(readOnlyTags[i]) !== null) { + return true; + } + } + return false; }