mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
e80fb5e20f
refs https://github.com/TryGhost/Team/issues/3248 - API queries for tiers are now using the TiersRepository with internal caching - the repository had a bug with it's `toPrimitive()` method which meant the cached tier objects had very few properties - the Tier object has all properties as private getters except for standard `events` property which meant the spread operator didn't have anything to spread into the object resulting in all tiers having a shape like `{events: [], active: true, type: 'paid', id: 'abcd'}` - the `getAll()` method uses nql to match against the cached tier objects but with them not being fully populated it wasn't able to match and so returned an empty array --- - changing the spread to use `tier.toJSON()` means we're populating all of the tier data properly allowing filter matches to work |
||
---|---|---|
.. | ||
content | ||
core | ||
test | ||
.c8rc.e2e.json | ||
.c8rc.json | ||
.eslintignore | ||
.eslintrc.js | ||
.npmignore | ||
config.development.json | ||
ghost.js | ||
index.js | ||
jsconfig.json | ||
loggingrc.js | ||
MigratorConfig.js | ||
package.json | ||
playwright.config.js |