dianping/cat · error · Error
Provided callback for onafterchange was not a function
Error message
Provided callback for onafterchange was not a function
What it means
Error "Provided callback for onafterchange was not a function" thrown in dianping/cat.
Source
Thrown at cat-home/src/main/webapp/js/intro.js:1239
this._introBeforeChangeCallback = providedCallback;
} else {
throw new Error('Provided callback for onbeforechange was not a function');
}
return this;
},
onchange: function(providedCallback) {
if (typeof (providedCallback) === 'function') {
this._introChangeCallback = providedCallback;
} else {
throw new Error('Provided callback for onchange was not a function.');
}
return this;
},
onafterchange: function(providedCallback) {
if (typeof (providedCallback) === 'function') {
this._introAfterChangeCallback = providedCallback;
} else {
throw new Error('Provided callback for onafterchange was not a function');
}
return this;
},
oncomplete: function(providedCallback) {
if (typeof (providedCallback) === 'function') {
this._introCompleteCallback = providedCallback;
} else {
throw new Error('Provided callback for oncomplete was not a function.');
}
return this;
},
onexit: function(providedCallback) {
if (typeof (providedCallback) === 'function') {
this._introExitCallback = providedCallback;
} else {
throw new Error('Provided callback for onexit was not a function.');
}
return this;View on GitHub (pinned to e815e74d4c)
Solutions
- Pass a function to setOnAfterChange or omit the callback.
- Check for a typo that passes a non-function value such as undefined.
When it happens
Trigger: Triggered when onafterchange is assigned a non-function value instead of a callback function.
Common situations: See trigger scenarios.
AI-assisted analysis of dianping/cat@e815e74d4c (2026-08-14).
Data as JSON: /api/errors/ad03c00e22eacee0.
Report an issue: GitHub.