We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83d7d1e commit 3d815a3Copy full SHA for 3d815a3
src/loaders/api/api.js
@@ -29,7 +29,9 @@ export function setTopLevelCallers () {
29
function caller (fnName, ...args) {
30
let returnVals = []
31
Object.values(nr.initializedAgents).forEach(val => {
32
- if (val.exposed && val.api[fnName]) {
+ if (!val || !val.api) {
33
+ warn(`Call to api '${fnName}' made before agent fully initialized.`)
34
+ } else if (val.exposed && val.api[fnName]) {
35
returnVals.push(val.api[fnName](...args))
36
}
37
})
0 commit comments