I THOUGHT I did. I was getting a weird failure. Probably shouldn’t matter.

 

Yes, I like the fact that 

 

something = !!something 

 

turns something into a Boolean so that later this is true:

typeof something === ‘boolean’

 

From: Thomas Burleson [mailto:notifications@github.com] 
Sent: Thursday, April 10, 2014 3:22 PM
To: Breeze/breeze.js.samples
Cc: Ward Bell
Subject: Re: [breeze.js.samples] zza: simple but important (#9)

 

In node/zza-node-mongo/server/breeze-routes.js:

> @@ -38,7 +38,7 @@
>          var resourceName  = req.params.resource;
>          var query = repository['get'+resourceName.toLowerCase()];
>  
> -        if ( query ) {
> +        if ( !!query ) {

I like this syntactic trick. Have you found issues with if ( query ) not working?

—
Reply to this email directly or view it on GitHub <https://github.com/Breeze/breeze.js.samples/pull/9/files#r11509597> .