Skip to content

fix(config): prevent OpenClaw config page crash on non-string payloads - #82

Merged
kalinon merged 1 commit into
mainfrom
fix/config-view-nonstring-raw
Apr 13, 2026
Merged

fix(config): prevent OpenClaw config page crash on non-string payloads#82
kalinon merged 1 commit into
mainfrom
fix/config-view-nonstring-raw

Conversation

@moltar-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes OpenClaw Config page crash:

TypeError: d.includes is not a function

Root cause

After OpenClaw update, config payload can return raw/config as a non-string shape in some cases. The UI assumed a string and called .includes(...) directly.

Changes

  • API: normalize config payloads to string before returning to frontend
    • api/src/services/openclawConfigService.js
    • Added normalizeRawConfig(...) and used it in:
      • getConfig()
      • applyConfig() current config fetch path
  • Web: guard redacted placeholder check with a string type check
    • web/src/pages/OpenClawConfigSettings.jsx
    • hasRedactedValues now checks typeof raw === 'string'

Validation

  • npm run -w ./web lint

@kalinon
kalinon merged commit 8d08ec2 into main Apr 13, 2026
9 checks passed
@kalinon
kalinon deleted the fix/config-view-nonstring-raw branch April 13, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants