theprogrammablemind 8.0.0-beta.27 → 8.0.0-beta.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +2 -2
package/package.json CHANGED
@@ -64,6 +64,6 @@
64
64
  "sort-json": "^2.0.0",
65
65
  "uuid": "^8.3.2"
66
66
  },
67
- "version": "8.0.0-beta.27",
67
+ "version": "8.0.0-beta.29",
68
68
  "license": "UNLICENSED"
69
69
  }
package/src/config.js CHANGED
@@ -2857,8 +2857,8 @@ class Config {
2857
2857
  const mores = []
2858
2858
  for (const createConfig of createConfigs) {
2859
2859
  const more = await createConfig()
2860
- if (mores.find( (km) => km.name == more.name)) {
2861
- throw new Error(`Expected add argument number ${index+1} to be a function that constructs the config.`)
2860
+ if (this.name && this.name == more.name) {
2861
+ throw new Error('Cannot add an object to itself for argument number ${index+1}.')
2862
2862
  }
2863
2863
  if (this === more) {
2864
2864
  throw new Error('Cannot add an object to itself.')