mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Fix use of test() method on color string
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user