Skip to content

Conversation

@Dragwar
Copy link
Contributor

@Dragwar Dragwar commented Mar 24, 2022

Includes:

First time contributing, my fix is to remove the following if check in order to return a normal ObjectDescriptor within the ObjectDescriptorProvider.TryGetDescriptor(...) method.

// ObjectDescriptorProvider.cs
public bool TryGetDescriptor(Type type, out ObjectDescriptor value)
{
    if (type == StringType)
    {
        value = ObjectDescriptor.Empty;
        return false;
    }
    ...
}

I don't fully understand the reasoning behind this if check.
This if check was added in "Introduce reactive helper registration, improve general performance" - commit: 9d52004.

Anyway this PR removes this check, let me know if you don't think this is a good change or have any suggestions.

@oformaniuk oformaniuk added the bug label Mar 26, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@oformaniuk oformaniuk merged commit 4d08171 into Handlebars-Net:master Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.length no longer works

2 participants