Modify Util warehouse base64 code

Modify function parameters, delete a judgment

issue:https://gitee.com/openharmony/js_api_module/issues/I582UQ

Signed-off-by: xllify <lixinlong18@huawei.com>
This commit is contained in:
xllify
2022-05-18 16:03:00 +08:00
parent b3760ba346
commit 74b818e4a7
+1 -3
View File
@@ -83,9 +83,7 @@ namespace OHOS::Util {
}
const char *encString = reinterpret_cast<const char*>(ret);
napi_value resultStr = nullptr;
if (strlen(encString) != 0) {
NAPI_CALL(env, napi_create_string_utf8(env, encString, strlen(encString), &resultStr));
}
napi_create_string_utf8(env, encString, strlen(encString), &resultStr);
FreeMemory(ret);
return resultStr;
}