null comparison is sketchy
This commit is contained in:
Родитель
ced9c525af
Коммит
18a46635b0
|
@ -73,18 +73,18 @@ function Connection (options) {
|
|||
};
|
||||
|
||||
for (var key in options) {
|
||||
if (options[key] == null) {
|
||||
if (options[key] === null || options[key] === undefined) {
|
||||
debug("Option [" + key + "] set to null. This may cause unexpected behaviour.");
|
||||
}
|
||||
}
|
||||
|
||||
util.extend(this.options, options);
|
||||
|
||||
if (this.options.gateway != null) {
|
||||
if (this.options.gateway) {
|
||||
this.options.address = this.options.gateway;
|
||||
}
|
||||
|
||||
if (this.options.address == null) {
|
||||
if (!this.options.address) {
|
||||
if (this.options.production) {
|
||||
this.options.address = "gateway.push.apple.com";
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче