Skip to content

Javascript error in FluentDesignTheme.razor.js when no stored theme #3040

@DM-98

Description

@DM-98

🐛 Bug Report

Getting Exception when I clear browser data and no theme is stored:
FluentDesignTheme: failing to load theme from localStorage. TypeError: Cannot read properties of null (reading 'mode')
But once I store theme by changing mode, the error goes away.

💻 Repro or Code Sample

Design Theme in fluentui-blazor.net has repro

🤔 Expected Behavior

No error while no 'theme' is stored locally.

😯 Current Behavior

Error occurs when no 'theme' is stored locally.

🌍 Your Environment

  • Blazor Global InteractiveServer without prerendering
  • .NET 9
  • OS & Device: Windows
  • Browser: Google Chrome
  • Fluent UI Blazor library Version [4.10.4]

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew issue. Needs to be looked at

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions