fix windows tests
This commit is contained in:
parent
549042160f
commit
a20b379f26
2 changed files with 27 additions and 23 deletions
|
@ -19,12 +19,16 @@ class AutoUpdater extends EventEmitter {
|
|||
|
||||
setFeedURL (options) {
|
||||
let updateURL
|
||||
if (typeof options === 'string') {
|
||||
if (typeof options === 'object') {
|
||||
if (typeof options.url === 'string') {
|
||||
updateURL = options.url
|
||||
} else {
|
||||
throw new Error('Expected options object to contain a \'url\' string property in setFeedUrl call')
|
||||
}
|
||||
} else if (typeof options === 'string') {
|
||||
updateURL = options
|
||||
} else if (typeof options === 'object' && typeof options.url === 'string') {
|
||||
updateURL = options.url
|
||||
} else {
|
||||
throw new Error('Expected options.url to be a string but none was provided')
|
||||
throw new Error('Expected an options object with a \'url\' property to be provided')
|
||||
}
|
||||
this.updateURL = updateURL
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue