Skip to content

Commit

Permalink
feat(query-preview): use deep equal to compare request (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
CachedaCodes authored Sep 18, 2023
1 parent bcf6d3e commit cf3c3e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<script lang="ts">
import Vue from 'vue';
import { Component, Prop, Inject, Watch } from 'vue-property-decorator';
import { Dictionary } from '@empathyco/x-utils';
import { deepEqual, Dictionary } from '@empathyco/x-utils';
import { SearchRequest, Result } from '@empathyco/x-types';
import { State } from '../../../components/decorators/store.decorators';
import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';
Expand Down Expand Up @@ -206,7 +206,7 @@
this.$watch(
() => this.queryPreviewRequest,
(newRequest, oldRequest) => {
if (JSON.stringify(newRequest) !== JSON.stringify(oldRequest)) {
if (!deepEqual(newRequest, oldRequest)) {
this.emitQueryPreviewRequestUpdated(newRequest);
}
}
Expand Down

0 comments on commit cf3c3e7

Please sign in to comment.