| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f845ad9 commit 96b2bfb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments