'use strict';

const express = require('express');
const router = express.Router();

module.exports = (app) => {
  router.get('/', (req, res) => {
    app.set('entryPointUrl', null);
    if (req.session) {
      req.session.destroy();
    }
    res.redirect(app.get('configureUrl'));
  });

  return router;
};

'use strict';

const express = require('express');
const router = express.Router();

module.exports = (app) => {
  router.get('/', (req, res) => {
    app.set('entryPointUrl', null);
    req.session.destroy();
    res.redirect(app.get('configureUrl'));
  });

  return router;
};

Remove null check before destroy
Remove null check before destroy

Session should not be null when logout is pressed through normal usage.
Since we removed the logout touchbar button this check is no longer
required.
