Skip to content

Commit 37b4131

Browse files
jasnelldaeyeon
andauthored
Apply suggestions from code review
Co-authored-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
1 parent 5094f05 commit 37b4131

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_file.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static void ReadLink(const FunctionCallbackInfo<Value>& args) {
14091409
Local<Value> ret;
14101410
if (!StringBytes::Encode(isolate, link_path, encoding, &error)
14111411
.ToLocal(&ret)) {
1412-
DCHECK(!ret.IsEmpty());
1412+
DCHECK(!error.IsEmpty());
14131413
env->isolate()->ThrowException(error);
14141414
return;
14151415
}
@@ -1968,7 +1968,7 @@ static void RealPath(const FunctionCallbackInfo<Value>& args) {
19681968
Local<Value> ret;
19691969
if (!StringBytes::Encode(isolate, link_path, encoding, &error)
19701970
.ToLocal(&ret)) {
1971-
DCHECK(!ret.IsEmpty());
1971+
DCHECK(!error.IsEmpty());
19721972
env->isolate()->ThrowException(error);
19731973
return;
19741974
}
@@ -2063,7 +2063,7 @@ static void ReadDir(const FunctionCallbackInfo<Value>& args) {
20632063
Local<Value> fn;
20642064
if (!StringBytes::Encode(isolate, ent.name, encoding, &error)
20652065
.ToLocal(&fn)) {
2066-
DCHECK(!fn.IsEmpty());
2066+
DCHECK(!error.IsEmpty());
20672067
isolate->ThrowException(error);
20682068
return;
20692069
}

0 commit comments

Comments
 (0)