0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed [Object] appearing in Sentry log for unsaved-changes reason diff

ref https://linear.app/tryghost/issue/ENG-661
This commit is contained in:
Kevin Ansfield 2024-09-18 17:25:11 +01:00
parent 618d0b130a
commit 48b1b7d504

View file

@ -1178,7 +1178,7 @@ export default class LexicalEditorController extends Controller {
}
// don't push full lexical state to Sentry, it's too large, gets filtered often and not useful
const sentryContext = {...this._leaveModalReason.context, secondaryLexical: undefined, scratch: undefined, lexical: undefined};
const sentryContext = {...this._leaveModalReason.context, diff: JSON.stringify(this._leaveModalReason.context?.diff), secondaryLexical: undefined, scratch: undefined, lexical: undefined};
Sentry.captureMessage('showing leave editor modal', {extra: {...this._leaveModalReason, context: sentryContext}});
console.log('showing leave editor modal', this._leaveModalReason); // eslint-disable-line