Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Don't use null for undefined properties #27

Open
caspervonb opened this issue Apr 29, 2016 · 2 comments
Open

Don't use null for undefined properties #27

caspervonb opened this issue Apr 29, 2016 · 2 comments

Comments

@caspervonb
Copy link

Saw the output of #18 and started digging around a little bit, I'm seeing null being used for a lot of optional parameters.

For example, subtypes are marked as null in https://github.com/Microsoft/edge-diagnostics-adapter/blob/master/EdgeWebKitImpl/debugger.ts#L320-L323

If there is no subtype, then the property should just not be set?

@caspervonb
Copy link
Author

Lazy fix, change https://github.com/Microsoft/edge-diagnostics-adapter/blob/master/EdgeWebKitImpl/debugger.ts#L353 to be

if (subType) {
 /* ...*/
}

@andysterland
Copy link
Member

@caspervonb thanks! I'll look at fixing this soon.

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