Made options parameter optional
refs https://github.com/TryGhost/Toolbox/issues/139 - The options parameter doesn't have to be passed in as there is handling for a default value in place - "permanent = false"
This commit is contained in:
parent
2dc4f3209f
commit
eb6d1b208a
@ -87,12 +87,12 @@ class DynamicRedirectManager {
|
||||
/**
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
* @param {object} options
|
||||
* @param {boolean} options.permanent
|
||||
* @param {object} [options]
|
||||
* @param {boolean} [options.permanent]
|
||||
*
|
||||
* @returns {string} The redirect ID
|
||||
*/
|
||||
addRedirect(from, to, options) {
|
||||
addRedirect(from, to, options = {}) {
|
||||
try {
|
||||
const fromRegex = this.buildRegex(from);
|
||||
const redirectId = from;
|
||||
|
Loading…
Reference in New Issue
Block a user