performSave(type, data) {
        data.id = data.id || 'draft';
        data.type = type;
        data.revisionTimestamp = Date.now();
        const key = this.generateKey(data);
        try {
            this.storage.setItem(key, JSON.stringify(data));
            // Apply the filter after saving
            this.filterRevisions(data.id);
            
            return key;
        } catch (err) {
            if (err.name === 'QuotaExceededError') {
                // Remove the current key in case it's already in the index
                this.remove(key);
                
                // If there are any revisions, remove the oldest one and try to save again
                if (this.keys().length) {
                    Sentry.captureMessage('LocalStorage quota exceeded. Removing old revisions.', {tags: {localRevisions: 'quotaExceeded'}});
                    this.removeOldest();
                    return this.performSave(type, data);
                }
                // LocalStorage is full and there are no revisions to remove
                // We can't save the revision
                Sentry.captureMessage('LocalStorage quota exceeded. Unable to save revision.', {tags: {localRevisions: 'quotaExceededNoSpace'}});
                return;
            } else {
                Sentry.captureException(err, {tags: {localRevisions: 'saveError'}});
                return;
            }
        }
    }
Saves the revision to localStorage

If localStorage is full, the oldest revision will be removed
@param {string} type - post or page
@param {object} data - serialized post data
@returns {string | undefined} - key of the saved revision or undefined if it couldn't be saved