mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-08-25 11:59:31 -04:00
!27 modify reviewbot
Merge pull request !27 from clearme777/OpenHarmony-3.0-LTS
This commit is contained in:
@@ -301,10 +301,10 @@ napi_value ConvertXml::convert(std::string strXml)
|
||||
napi_value subSubObject = nullptr;
|
||||
napi_create_object(env_, &subSubObject);
|
||||
napi_create_object(env_, &subObject);
|
||||
if (doc->version != nullptr) {
|
||||
if (doc != nullptr && doc->version != nullptr) {
|
||||
SetKeyValue(subSubObject, "version", (const char*)doc->version);
|
||||
}
|
||||
if (doc->encoding != nullptr) {
|
||||
if (doc != nullptr && doc->encoding != nullptr) {
|
||||
SetKeyValue(subSubObject, "encoding", (const char*)doc->encoding);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user