Skip to content

Commit

Permalink
return data channel id or -1
Browse files Browse the repository at this point in the history
  • Loading branch information
murat-dogan committed Jan 6, 2023
1 parent b621b42 commit e7db050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data-channel-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Napi::Value DataChannelWrapper::getId(const Napi::CallbackInfo &info)
return info.Env().Null();
}

return Napi::Number::New(info.Env(), mDataChannelPtr->id().value());
return Napi::Number::New(info.Env(), mDataChannelPtr->id().value_or(-1));
}

Napi::Value DataChannelWrapper::getProtocol(const Napi::CallbackInfo &info)
Expand Down

0 comments on commit e7db050

Please sign in to comment.