Skip to content

Commit

Permalink
refactor: replace rest/spread with Object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
manniL committed Aug 24, 2018
1 parent 55a015c commit a662891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = async function module (moduleOptions) {
const initialRules = Object.assign([], this.options.redirect, moduleOptions)

// Transform each "from" value to a RegExp for later test
const regExpRules = initialRules.map(o => (Object.assign({}, { ...o, from: new RegExp(o.from) })))
const regExpRules = initialRules.map(o => (Object.assign({}, o, { from: new RegExp(o.from) })))
const middleware = require('./middleware.js')(regExpRules)

this.addServerMiddleware(middleware)
Expand Down

0 comments on commit a662891

Please sign in to comment.