Skip to content

Commit

Permalink
fix(core): fix corejs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
churchill-zhang committed Dec 15, 2021
1 parent 42b8db3 commit ec8e9a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions framework/js/core/js/global/UIManagerModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ const uiEventKeyMap = {

// 兼容 hippy2.0,hippy3.0 放量一段时间后可删除
function HandleEventListener(node) {
for (const [key, value] of Object.entries(node)) {
if (typeof value === 'function') {
for (const [key, value] of Object.entries(node.props)) {
if ((gestureKeyMap[key] || uiEventKeyMap[key]) && value === true) {
let name;
const { id } = node;
global.ConsoleModule.debug(`HandleEventListener id = ${id}, key = ${key}`);
if (gestureKeyMap[key]) {
name = gestureKeyMap[key];
const {
Expand Down
4 changes: 2 additions & 2 deletions framework/js/core/src/napi/jsc/js_native_api_value_jsc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ JSStringRef JSCCtx::CreateJSCString(const unicode_string_view& str_view) {
break;
}
case unicode_string_view::Encoding::Utf8: {
std::string aaa(
std::string temp(
reinterpret_cast<const char*>(str_view.utf8_value().c_str()),
str_view.utf8_value().length());
ret = JSStringCreateWithUTF8CString(aaa.c_str());
ret = JSStringCreateWithUTF8CString(temp.c_str());
break;
}
case unicode_string_view::Encoding::Utf16: {
Expand Down
4 changes: 2 additions & 2 deletions framework/js/core/src/napi/jsc/native_source_code_ios.cc

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions framework/js/core/src/napi/v8/native_source_code_android.cc

Large diffs are not rendered by default.

0 comments on commit ec8e9a9

Please sign in to comment.