Ghost/ghost/admin/app/utils/route.js

16 lines
381 B
JavaScript
Raw Normal View History

import Route from 'ember-route';
Route.reopen({
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.get('upgradeStatus').requireUpgrade();
return false;
} else {
this._super(...arguments);
}
}
}
});