Update utils.ts

pull/5621/head
pushkin 5 years ago committed by GitHub
parent 3c445c3806
commit bfba232dac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -159,5 +159,5 @@ export function set_store_value(store, ret, value = ret) {
export const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
export function action_destroyer(action_result) {
return action_result && is_function(action_result.destroy) ? () => action_result.destroy() : noop;
return action_result ? () => is_function(action_result.destroy) && action_result.destroy() : noop;
}

Loading…
Cancel
Save