theprogrammablemind_4wp 7.5.8-beta.41 → 7.5.8-beta.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +7 -4
package/package.json CHANGED
@@ -63,6 +63,6 @@
63
63
  "json-stable-stringify": "^1.0.1",
64
64
  "node-fetch": "^2.6.1"
65
65
  },
66
- "version": "7.5.8-beta.41",
66
+ "version": "7.5.8-beta.43",
67
67
  "license": "ISC"
68
68
  }
package/src/config.js CHANGED
@@ -933,11 +933,14 @@ class Config {
933
933
  const instanceFragments = (instance.fragments || []).map((fragment) => fragment.key || fragment.query).map( toCanonical )
934
934
  const templateFragments = (template.fragments || []).concat(this.dynamicFragments).map( toCanonical )
935
935
  const sameFragments = helpers.safeEquals(templateFragments, instanceFragments)
936
- const sameQueries = helpers.safeEquals((template.queries || []).map(helpers.updateQueries), (instance.queries || []))
937
- if (!(instance && sameQueries && sameFragments)) {
938
- console.log("sameFragments", sameFragments)
939
- console.log("sameQueries", sameQueries)
936
+ const cleanupWhere = (query) => {
937
+ if (typeof query == 'string') {
938
+ return query
939
+ } else {
940
+ return { ...query, where: undefined }
941
+ }
940
942
  }
943
+ const sameQueries = helpers.safeEquals((cleanupWhere(template.queries) || []).map(helpers.updateQueries), (cleanupWhere(instance.queries) || []))
941
944
  return !(instance && sameQueries && sameFragments)
942
945
  }
943
946