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

13 lines
210 B
JavaScript

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