hpyhacking/peatio · error

Invalid state ref '{}'

Error message

Invalid state ref '{}'

What it means

Error "Invalid state ref '{}'" thrown in hpyhacking/peatio.

Source

Thrown at app/assets/javascripts/lib/angular-ui-router.js:3358

}

/**
 * Shared ui-view code for both directives:
 * Given attributes and inherited $uiView data, return the view's name
 */
function getUiViewName(attrs, inherited) {
  var name = attrs.uiView || attrs.name || '';
  return name.indexOf('@') >= 0 ?  name :  (name + '@' + (inherited ? inherited.state.name : ''));
}

angular.module('ui.router.state').directive('uiView', $ViewDirective);
angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);

function parseStateRef(ref, current) {
  var preparsed = ref.match(/^\s*({[^}]*})\s*$/), parsed;
  if (preparsed) ref = current + '(' + preparsed[1] + ')';
  parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
  if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
  return { state: parsed[1], paramExpr: parsed[3] || null };
}

function stateContext(el) {
  var stateData = el.parent().inheritedData('$uiView');

  if (stateData && stateData.state && stateData.state.name) {
    return stateData.state;
  }
}

/**
 * @ngdoc directive
 * @name ui.router.state.directive:ui-sref
 *
 * @requires ui.router.state.$state
 * @requires $timeout
 *

View on GitHub (pinned to dab8641137)

Solutions

  1. Pass a valid state name string or state object where the state reference is expected; check the value bound to ui-sref or passed to $state.go().

When it happens

Trigger: Thrown at app/assets/javascripts/lib/angular-ui-router.js:3358 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/454611d399f6e342. Report an issue: GitHub.