Fix install
This commit is contained in:
parent
b71173820d
commit
d75fb96f6b
|
@ -662,7 +662,8 @@ MyClass.prototype.__proto__ = EventEmitter.prototype;
|
|||
// C++
|
||||
void MyClass::emit(const Napi::CallbackInfo& info, const char* name) {
|
||||
NAPI_ENV;
|
||||
eventEmit(env, info.This().As<Napi::Object>(), name);
|
||||
THIS_OBJ(that);
|
||||
eventEmit(env, that, name);
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -19,10 +19,9 @@ const onError = msg => {
|
|||
|
||||
const install = (url, count = 1) => {
|
||||
|
||||
url = url.toLowerCase();
|
||||
const proto = protocols[url.match(/^https?/)[0]];
|
||||
|
||||
const request = https.get(url, response => {
|
||||
const request = proto.get(url, response => {
|
||||
|
||||
// Handle redirects
|
||||
if ([301, 302, 303, 307].includes(response.statusCode)) {
|
||||
|
|
Loading…
Reference in New Issue