engine icon indicating copy to clipboard operation
engine copied to clipboard

Services: 'undefined' in method arguments gets converted to null when calling a remote service

Open alisey opened this issue 2 years ago • 0 comments

If you have the following service:

class EchoService {
    public echo(message = 'hello world') {
        return message;
    }
}

Calling it from a different environment as EchoService.echo(undefined) will return null instead of 'hello world'.

This has tripped me a few times. Undefined should stay undefined.

alisey avatar Sep 14 '22 18:09 alisey