mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix windows tests
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user