From 8c60ea039728143eba8b556f5b7c74f3af5fcd48 Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:37:06 +0100 Subject: [PATCH 1/3] redirect users to the supportModal when implementation errors occur --- src/utils/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 78e107bcf..7a8e55ffa 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -181,7 +181,7 @@ export const _safewrap = function any = (...args: // @ts-ignore return f.apply(this, args) } catch (e) { - logger.critical('Implementation error. Please turn on debug and contact support@posthog.com.') + logger.critical('Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.') logger.critical(e) } } as F @@ -243,7 +243,7 @@ function deepCircularCopy = Record>( result = {} as T _each(value, (val, key) => { if (!COPY_IN_PROGRESS_SET.has(val)) { - ;(result as any)[key] = internalDeepCircularCopy(val, key) + ; (result as any)[key] = internalDeepCircularCopy(val, key) } }) } @@ -395,7 +395,7 @@ export const _register_event = (function () { } else { const ontype = 'on' + type const old_handler = (element as any)[ontype] // can be undefined - ;(element as any)[ontype] = makeHandler(element, handler, old_handler) + ; (element as any)[ontype] = makeHandler(element, handler, old_handler) } } @@ -440,10 +440,10 @@ export const _register_event = (function () { return event } fixEvent.preventDefault = function () { - ;(this as any as Event).returnValue = false + ; (this as any as Event).returnValue = false } fixEvent.stopPropagation = function () { - ;(this as any as Event).cancelBubble = true + ; (this as any as Event).cancelBubble = true } return register_event From 33f50730ade110a6c89fd9578a436dba3bedc558 Mon Sep 17 00:00:00 2001 From: Marcus Hof <13001502+MarconLP@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:41:02 +0100 Subject: [PATCH 2/3] remove linting changes --- src/utils/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 7a8e55ffa..12587252c 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -243,7 +243,7 @@ function deepCircularCopy = Record>( result = {} as T _each(value, (val, key) => { if (!COPY_IN_PROGRESS_SET.has(val)) { - ; (result as any)[key] = internalDeepCircularCopy(val, key) + ;(result as any)[key] = internalDeepCircularCopy(val, key) } }) } @@ -395,7 +395,7 @@ export const _register_event = (function () { } else { const ontype = 'on' + type const old_handler = (element as any)[ontype] // can be undefined - ; (element as any)[ontype] = makeHandler(element, handler, old_handler) + ;(element as any)[ontype] = makeHandler(element, handler, old_handler) } } @@ -440,10 +440,10 @@ export const _register_event = (function () { return event } fixEvent.preventDefault = function () { - ; (this as any as Event).returnValue = false + ;(this as any as Event).returnValue = false } fixEvent.stopPropagation = function () { - ; (this as any as Event).cancelBubble = true + ;(this as any as Event).cancelBubble = true } return register_event From b7d4182a271dbd177a2b3f2408a18d0e4be6109c Mon Sep 17 00:00:00 2001 From: Marcus Hof <13001502+MarconLP@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:41:24 +0100 Subject: [PATCH 3/3] remove additional linting changes --- src/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 12587252c..6a3ee2109 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -395,7 +395,7 @@ export const _register_event = (function () { } else { const ontype = 'on' + type const old_handler = (element as any)[ontype] // can be undefined - ;(element as any)[ontype] = makeHandler(element, handler, old_handler) + ;(element as any)[ontype] = makeHandler(element, handler, old_handler) } }