Semantic-Org/Semantic-UI · error

Progress value is non numeric

Error message

Progress value is non numeric

What it means

update.progress() first coerces the value via get.numericValue() (progress.js:280-287), which strips non-digit/non-dot characters and returns false if nothing numeric remains. When it returns false, the module logs error.nonNumeric (progress.js:644-646) — the supplied value could not be interpreted as a number.

Source

Thrown at src/definitions/modules/progress.js:891

  percent        : false,
  total          : false,
  value          : false,

  // delay in ms for fail safe animation callback
  failSafeDelay : 100,

  onLabelUpdate : function(state, text, value, total){
    return text;
  },
  onChange      : function(percent, value, total){},
  onSuccess     : function(total){},
  onActive      : function(value, total){},
  onError       : function(value, total){},
  onWarning     : function(value, total){},

  error    : {
    method     : 'The method you called is not defined.',
    nonNumeric : 'Progress value is non numeric',
    tooHigh    : 'Value specified is above 100%',
    tooLow     : 'Value specified is below 0%'
  },

  regExp: {
    variable: /\{\$*[A-z0-9]+\}/g
  },

  metadata: {
    percent : 'percent',
    total   : 'total',
    value   : 'value'
  },

  selector : {
    bar      : '> .bar',
    label    : '> .label',
    progress : '.bar > .progress'

View on GitHub (pinned to 597843ab84)

Solutions

  1. Sanitize the value to a number before calling update progress (Number(x) || 0).
  2. Guard with isFinite(Number(value)) before passing to .progress().
  3. Handle non-numeric states (e.g. indeterminate) with a separate code path rather than feeding bad values.

Example fix

// before
$('.ui.progress').progress('update progress', raw); // raw === 'N/A' -> [96]

// after
var n = Number(String(raw).replace(/[^0-9.]/g, ''));
if (isFinite(n)) $('.ui.progress').progress('update progress', n);
Defensive patterns

Strategy: type-guard

Validate before calling

var n = (typeof raw === 'string') ? Number(raw.replace(/[^0-9.\-]/g,'')) : Number(raw);
if (!isFinite(n)) throw new Error('Progress value is non-numeric: ' + raw);
$('.ui.progress').progress('update progress', n);

Type guard

function isNumericValue(v){ var n = (typeof v === 'string') ? Number(v.replace(/[^0-9.\-]/g,'')) : Number(v); return isFinite(n); }

Prevention

When it happens

Trigger: Calling $('.progress').progress('update progress', 'abc') or .progress({ value: 'N/A' }) where the value has no numeric content; passing an object/array/undefined that numericValue cannot reduce to a number.

Common situations: Binding progress to a backend field that returns '-' or 'N/A' on loading; user-supplied values; parsing strings like 'completed' with no digits; null/undefined passed where a number is expected.

Related errors


AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13). Data as JSON: /api/errors/9951daea9927a496. Report an issue: GitHub.