0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Removed unneeded customThemes limit check

no issue

- the first check when uploading a theme is the same as the second but without returning a specific error message so it shouldn't be necessary
This commit is contained in:
Kevin Ansfield 2021-10-12 08:27:25 +01:00
parent bc5be1a808
commit fee190eb08

View file

@ -22,10 +22,6 @@ export default class ThemeManagementService extends Service {
async upload(event) { async upload(event) {
event?.preventDefault(); event?.preventDefault();
if (this.limit.limiter.isLimited('customThemes')) {
return this.modals.open('modals/limits/custom-theme');
}
try { try {
// Sending a bad string to make sure it fails (empty string isn't valid) // Sending a bad string to make sure it fails (empty string isn't valid)
await this.limit.limiter.errorIfWouldGoOverLimit('customThemes', {value: '.'}); await this.limit.limiter.errorIfWouldGoOverLimit('customThemes', {value: '.'});