@@ -100,8 +100,12 @@ void TTYWrap::GetWindowSize(const FunctionCallbackInfo<Value>& args) {
|
100 | 100 | |
101 | 101 | if (err == 0) { |
102 | 102 | Local<Array> a = args[0].As<Array>(); |
103 | | - a->Set(env->context(), 0, Integer::New(env->isolate(), width)).Check(); |
104 | | - a->Set(env->context(), 1, Integer::New(env->isolate(), height)).Check(); |
| 103 | +if (a->Set(env->context(), 0, Integer::New(env->isolate(), width)) |
| 104 | + .IsNothing() || |
| 105 | + a->Set(env->context(), 1, Integer::New(env->isolate(), height)) |
| 106 | + .IsNothing()) { |
| 107 | +return; |
| 108 | + } |
105 | 109 | } |
106 | 110 | |
107 | 111 | args.GetReturnValue().Set(err); |
|