Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Asserting string_value == null in optional function parameter returns false #8

Open
ti24horas opened this issue Feb 15, 2014 · 2 comments

Comments

@ti24horas
Copy link

Hi,

After rewriting my project to use JurassicTools I found a problem:

[JSFunction(Name = "param")]
public string Parameter(string parameterName, string parameterValue = null, bool global = false){
    if(parameterValue == null){
        // parameterValue is never null
        return ""; // my call in js file is this.param('test');
    }
}

The comparison with null is never true because I think string parameter is backed up by a Jurassic string proxy object.

@frozenice
Copy link
Owner

Hey,

thanks for the report! Sadly I don't have the time work on this anymore (I kinda moved on to Groovy and NodeJS). But feel free to investigate and maybe send a PR. ;)

@ti24horas
Copy link
Author

Hi,

Its very dificult to do a PR. Your project uses a different tabbing, different new line. When I open in VS and save the file, all formating enters as change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants