1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Fix nyc misconfiguration

This commit is contained in:
Denis Demchenko
2018-06-30 19:21:09 +03:00
parent 107069b845
commit 3530ca1c70
5 changed files with 1906 additions and 3 deletions

View File

@@ -25,8 +25,8 @@ class Bowser {
* bowser.getBrowser()
*/
constructor(UA, skipParsing=false) {
if (!UA) {
throw new Error('UserAgent is not defined');
if (typeof UA !== 'string') {
throw new Error('UserAgent should be a string');
}
return new Parser(UA, skipParsing);
}