Skip to content

Commit

Permalink
fix: add missing return in chart_wrap.cpp
Browse files Browse the repository at this point in the history
+ remove duplicate JS_FreeValue
  • Loading branch information
jspngh committed May 30, 2024
1 parent b9889f3 commit c826cf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/render/native/components/chart/chart_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ static JSValue NativeCompSetRightAxisLabels(JSContext *ctx, JSValueConst this_va
JS_FreeCString(ctx, str_ori);
}

JS_FreeValue(ctx, len_value);

((Chart*)(ref->comp))->setRightAxisLabels(result);
LV_LOG_USER("Chart %s setRightAxisLabels", ref->uid);
}
Expand Down Expand Up @@ -510,6 +508,7 @@ static JSValue NativeCompSetLeftAxisRange(JSContext *ctx, JSValueConst this_val,

LV_LOG_USER("Chart %s setLeftAxisRange", ref->uid);
}
return JS_UNDEFINED;
};

static JSValue NativeCompSetRightAxisRange(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) {
Expand All @@ -531,6 +530,7 @@ static JSValue NativeCompSetRightAxisRange(JSContext *ctx, JSValueConst this_val

LV_LOG_USER("Chart %s setRightAxisRange", ref->uid);
}
return JS_UNDEFINED;
};

static JSValue NativeCompSetTopAxisRange(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) {
Expand All @@ -552,6 +552,7 @@ static JSValue NativeCompSetTopAxisRange(JSContext *ctx, JSValueConst this_val,

LV_LOG_USER("Chart %s setTopAxisRange", ref->uid);
}
return JS_UNDEFINED;
};

static JSValue NativeCompSetBottomAxisRange(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) {
Expand All @@ -573,6 +574,7 @@ static JSValue NativeCompSetBottomAxisRange(JSContext *ctx, JSValueConst this_va

LV_LOG_USER("Chart %s setBottomAxisRange", ref->uid);
}
return JS_UNDEFINED;
};

static const JSCFunctionListEntry ComponentProtoFuncs[] = {
Expand Down

0 comments on commit c826cf5

Please sign in to comment.