Skip to content

Commit

Permalink
🐛 fix(ECharts): Option can now be null (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Jan 13, 2025
1 parent 2cb097a commit a65f703
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Masa.Blazor/Components/ECharts/MECharts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MECharts : Container, IEChartsJsCallbacks
public Action<EChartsInitOptions>? InitOptions { get; set; }

[Parameter]
public object Option { get; set; } = new { };
public object? Option { get; set; }

[Parameter]
public bool Light { get; set; }
Expand Down Expand Up @@ -224,7 +224,7 @@ public async Task SetOption(object? option = null, bool notMerge = true, bool la
{
if (_echarts == null) return;

option ??= Option;
option ??= Option ?? new { };

if (IncludeFunctionsInOption && IsAnyFunction(option, out var optionJson))
{
Expand Down

0 comments on commit a65f703

Please sign in to comment.