iachat/app/javascript/dashboard
Shivam Mishra e0ef007047
fix: Fix Sentry issues from Vite migration (#10262)
Fixes the following issues

- https://chatwoot-p3.sentry.io/issues/5966466083
- https://chatwoot-p3.sentry.io/issues/5966497518
- https://chatwoot-p3.sentry.io/issues/5966555379

For the first one, I am not sure if the fix is 100% correct, since I was
not able to reproduce, but I am confident it will work.

For both, 1st and 2nd issues, the problem came from the fact that we set
individual records to `undefined` when the intent was to remove it,
explicitly using delete fixes the issue.

### Whats up with the store changes?

Glad you asked, this comes down to Vue reactivity, previously Vue didn't
track undefined strictly, it just kinda ignored it, in Vue 3, the
reactivity changed significantly when they introduced ES6 proxies. The
Proxy tracks all property changes, including those set to undefined, so
properties remain enumerable.

So to delete a record, we actually have to the delete it using the
delete keyword, or replace the parent object with a new object splicing
the object to be deleted out.

I am assuming it worked earlier because VueX 3 reactivity was using
Object.defineProperty. Setting it to undefined might have "deleted" it
earlier

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2024-10-14 10:44:59 -07:00
..
api chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
assets feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
components fix: Use native a tag for https URL in the sidebar (#10254) 2024-10-09 21:04:04 -07:00
components-next feat: Add the locale card component (#10270) 2024-10-11 15:52:03 -07:00
composables fix: Resolve accountId from the route, initialize route-sync before the app is loaded (#10245) 2024-10-08 09:25:51 -07:00
constants feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
helper chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
i18n chore: update interpolation syntax for i18n files (#10198) 2024-10-07 11:12:40 -07:00
mixins chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
modules feat: Update widget builder to support dark mode (#10230) 2024-10-04 15:53:31 -07:00
routes fix: Cannot read properties of undefined (reading '$touch') (#10264) 2024-10-10 21:29:43 -07:00
store fix: Fix Sentry issues from Vite migration (#10262) 2024-10-14 10:44:59 -07:00
App.vue fix: Resolve accountId from the route, initialize route-sync before the app is loaded (#10245) 2024-10-08 09:25:51 -07:00
featureFlags.js chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00