Skip to content

Ignore static properties in LiquidValueConverter #69

@robertwesterlund

Description

@robertwesterlund

The current implementation of the LiquidValueConverter includes static properties from classes, which is probably not intended (at least it was not expected behavior when we tried using it).

Example class:

public class ViewModel
{
    public string Title { get; set; }
    public static string OtherData { get; set; }
}

Code sample:

ViewModel.OtherData = "aaa";
var liquid = new ViewModel() { Title = "bbb" }.ToLiquid();

Expected result:

After executing the code sample, the liquid object should only include the Title property.

Observed result:

After executing the code sample, the liquid object includes both the Title property and the OtherData property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions