should throw error if createEventDispatch is used after instantiation

pull/3682/head
Tan Li Hau 6 years ago committed by Conduitry
parent def776520f
commit d54ef0ca0c

@ -28,7 +28,7 @@ export function onDestroy(fn) {
} }
export function createEventDispatcher() { export function createEventDispatcher() {
const component = current_component; const component = get_current_component();
return (type, detail) => { return (type, detail) => {
const callbacks = component.$$.callbacks[type]; const callbacks = component.$$.callbacks[type];

Loading…
Cancel
Save