theprogrammablemind_4wp 7.3.9-beta.13 → 7.3.9-beta.15
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/config.js +10 -2
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -1426,7 +1426,16 @@ class Config {
|
|
1426
1426
|
}
|
1427
1427
|
}
|
1428
1428
|
|
1429
|
-
initializer (fn,
|
1429
|
+
initializer (fn, options = {}) {
|
1430
|
+
if (options) {
|
1431
|
+
for (let option of Object.keys(options)) {
|
1432
|
+
const validOptions = ['initAfterApi']
|
1433
|
+
if (!['initAfterApi'].includes(option)) {
|
1434
|
+
throw `For Config.initializer, unrecognized option ${option}. The valid options are ${validOptions}`
|
1435
|
+
}
|
1436
|
+
}
|
1437
|
+
}
|
1438
|
+
const { initAfterApi = false } = options;
|
1430
1439
|
this.wasInitialized = false
|
1431
1440
|
this.initAfterApi = initAfterApi
|
1432
1441
|
this.initializerFn = (args) => {
|
@@ -1773,7 +1782,6 @@ class Config {
|
|
1773
1782
|
|
1774
1783
|
if (callInitializers) {
|
1775
1784
|
[...this.configs].reverse().forEach(({ namespace, uuid, config, isSelf }) => {
|
1776
|
-
console.log(config.name)
|
1777
1785
|
if (isSelf) {
|
1778
1786
|
config = this
|
1779
1787
|
}
|