pinafore/routes/_components/dialog/helpers/onCreateDialog.js

13 lines
210 B
JavaScript
Raw Normal View History

import { on } from '../../../_utils/eventBus'
function onDestroy (id) {
if (this.get('id') !== id) {
return
}
this.destroy()
}
export function oncreate () {
on('destroyDialog', this, onDestroy)
}