Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit a162db1

Browse files
James PrestwoodJimmy Huang
authored andcommitted
[callbacks] Fixed zjs_edit_js_func() (#494)
- Fixes promises which broke after callback optimization change Signed-off-by: James Prestwood <[email protected]>
1 parent ecbd945 commit a162db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zjs_callbacks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ void zjs_init_callbacks(void)
123123
void zjs_edit_js_func(zjs_callback_id id, jerry_value_t func)
124124
{
125125
if (id != -1) {
126-
jerry_release_value(cb_map[id]->func_list[0]);
127-
cb_map[id]->func_list[0] = jerry_acquire_value(func);
126+
jerry_release_value(cb_map[id]->js_func);
127+
cb_map[id]->js_func = jerry_acquire_value(func);
128128
}
129129
}
130130

0 commit comments

Comments
 (0)