mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed error when hostLimits are undefined
refs a7dd7bb64b
- The error was introduced in the refed commit. Object.assign method only works when the first parameter is an object otherwise it fails.
This commit is contained in:
parent
a7dd7bb64b
commit
d60d348c88
1 changed files with 7 additions and 2 deletions
|
@ -4,7 +4,10 @@ const db = require('../data/db');
|
|||
const LimitService = require('@tryghost/limit-service');
|
||||
let limitService = new LimitService();
|
||||
|
||||
const initFn = (limits) => {
|
||||
/**
|
||||
* @param {Object} [limits] - An object containing limit configuration
|
||||
**/
|
||||
const initFn = (limits = {}) => {
|
||||
let helpLink;
|
||||
|
||||
if (config.get('hostSettings:billing:enabled') && config.get('hostSettings:billing:enabled') === true && config.get('hostSettings:billing:url')) {
|
||||
|
@ -22,8 +25,10 @@ const initFn = (limits) => {
|
|||
};
|
||||
}
|
||||
|
||||
const hostLimits = config.get('hostSettings:limits') || {};
|
||||
|
||||
limitService.loadLimits({
|
||||
limits: Object.assign(config.get('hostSettings:limits'), limits),
|
||||
limits: Object.assign(hostLimits, limits),
|
||||
subscription,
|
||||
db,
|
||||
helpLink,
|
||||
|
|
Loading…
Add table
Reference in a new issue