Commit 033b7616 authored by Andrew Price's avatar Andrew Price
Browse files

js-duk: Pop non-function onevent elements in js_handle_event()

parent 73ea3bbe
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -785,6 +785,7 @@ int js_handle_event(struct mwevent *ev)
			duk_int_t t = duk_get_type(ctx, -1);
			fprintf(stderr, "mwjs warning: mw.onevent[%u] is of type %d, "
			                "not a function\n", i, t);
			duk_pop(ctx);
			continue;
		}
		if (js_push_event(ev) != 0) {