File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -237,20 +237,20 @@ export class BreadcrumbManager {
237237 */
238238 if ( this . options . beforeBreadcrumb ) {
239239 const breadcrumbClone = structuredClone ( bc ) ;
240- const modified = this . options . beforeBreadcrumb ( breadcrumbClone , hint ) ;
240+ const result = this . options . beforeBreadcrumb ( breadcrumbClone , hint ) ;
241241
242242 /**
243243 * false means discard
244244 */
245- if ( modified === false ) {
245+ if ( result === false ) {
246246 return ;
247247 }
248248
249249 /**
250250 * Valid breadcrumb → apply changes from hook
251251 */
252- if ( isValidBreadcrumb ( modified ) ) {
253- Object . assign ( bc , modified ) ;
252+ if ( isValidBreadcrumb ( result ) ) {
253+ Object . assign ( bc , result ) ;
254254 } else {
255255 /**
256256 * Anything else is invalid — warn, bc stays untouched (hook only received a clone)
Original file line number Diff line number Diff line change @@ -439,20 +439,20 @@ export default class Catcher {
439439 */
440440 if ( typeof this . beforeSend === 'function' ) {
441441 const eventClone = structuredClone ( payload ) ;
442- const modified = this . beforeSend ( eventClone ) ;
442+ const result = this . beforeSend ( eventClone ) ;
443443
444444 /**
445445 * false → drop event
446446 */
447- if ( modified === false ) {
447+ if ( result === false ) {
448448 throw new EventRejectedError ( 'Event rejected by beforeSend method.' ) ;
449449 }
450450
451451 /**
452452 * Valid event payload → use it instead of original
453453 */
454- if ( isValidEventPayload ( modified ) ) {
455- payload = modified as HawkJavaScriptEvent ;
454+ if ( isValidEventPayload ( result ) ) {
455+ payload = result as HawkJavaScriptEvent ;
456456 } else {
457457 /**
458458 * Anything else is invalid — warn, payload stays untouched (hook only received a clone)
Original file line number Diff line number Diff line change 11import log from '../utils/log' ;
22import type { CatcherMessage } from '@/types' ;
3+ import type { Transport } from '../types/transport' ;
34
45/**
56 * Custom WebSocket wrapper class
67 *
78 * @copyright CodeX
89 */
9- export default class Socket {
10+ export default class Socket implements Transport {
1011 /**
1112 * Socket connection endpoint
1213 */
You can’t perform that action at this time.
0 commit comments