hpyhacking/peatio · error
'locals' must be an object
Error message
'locals' must be an object
What it means
Error "'locals' must be an object" thrown in hpyhacking/peatio.
Source
Thrown at app/assets/javascripts/lib/angular-ui-router.js:327
}
cycle.pop();
visited[key] = VISIT_DONE;
}
forEach(invocables, visit);
invocables = cycle = visited = null; // plan is all that's required
function isResolve(value) {
return isObject(value) && value.then && value.$$promises;
}
return function (locals, parent, self) {
if (isResolve(locals) && self === undefined) {
self = parent; parent = locals; locals = null;
}
if (!locals) locals = NO_LOCALS;
else if (!isObject(locals)) {
throw new Error("'locals' must be an object");
}
if (!parent) parent = NO_PARENT;
else if (!isResolve(parent)) {
throw new Error("'parent' must be a promise returned by $resolve.resolve()");
}
// To complete the overall resolution, we have to wait for the parent
// promise and for the promise for each invokable in our plan.
var resolution = $q.defer(),
result = resolution.promise,
promises = result.$$promises = {},
values = extend({}, locals),
wait = 1 + plan.length/3,
merged = false;
function done() {
// Merge parent values we haven't got yet and publish our own $$values
if (!--wait) {View on GitHub (pinned to dab8641137)
Solutions
- Pass locals as an object map of names to values when calling $resolve.resolve(invocables, locals, parent); do not pass an array, string, or promise.
When it happens
Trigger: Thrown at app/assets/javascripts/lib/angular-ui-router.js:327 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hpyhacking/peatio@dab8641137 (2026-08-23).
Data as JSON: /api/errors/c754df234ea8e3a0.
Report an issue: GitHub.