mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue