Skip to content

Commit 441e837

Browse files
author
Simone Mariotti
committed
Fix integer coming up as pattern
1 parent 053cc70 commit 441e837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data/DeviceModels.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@ class DeviceModels {
280280
}
281281

282282
/**
283-
* Make the pattern compatible with JavaScript
283+
* Make the pattern compatible with JavaScript and transform it to string
284284
*
285285
* @param {string} pattern
286286
*
287287
* @return {string}
288288
*/
289289
static cleanUpPattern(pattern) {
290-
return pattern.replace('(?i)', '').replace('\\-', '-');
290+
return `${pattern}`.replace('(?i)', '').replace('\\-', '-');
291291
}
292292

293293
/**

0 commit comments

Comments
 (0)