Fix use of test() method on color string

This commit is contained in:
SilentSpike
2020-02-04 12:05:36 +00:00
parent 377e99240f
commit e6cf53dfe8

View File

@@ -230,7 +230,7 @@ export default {
// Cache served item colors to automatically style issue markers later
const { item: itemInt, color } = item;
if (color.test(/^#[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/)) {
if (/^#[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/.test(color)) {
_colorCache[itemInt] = color;
}
@@ -352,4 +352,4 @@ function jsonPromise(url, then) {
reject(err);
});
});
}
}