custom-wizard-redirect.js.es6 401 B

123456789101112131415
  1. export default {
  2. name: "custom-wizard-redirect",
  3. after: "message-bus",
  4. initialize: function (container) {
  5. const messageBus = container.lookup('message-bus:main');
  6. if (!messageBus) { return; }
  7. messageBus.subscribe("/redirect_to_wizard", function (wizardId) {
  8. const wizardUrl = window.location.origin + '/w/' + wizardId;
  9. window.location.href = wizardUrl;
  10. });
  11. }
  12. };