Skip to content

Conversation

@chexxor
Copy link

@chexxor chexxor commented Mar 20, 2014

Here's how I'm using BindOnce.

    <!-- Planning Price may be null. -->
    <span bindonce="row.Planning_Price__c">
        <span bo-text="row['Planning_Price__c'] | noFractionCurrency"
        /> <!-- This filter will output $0 if input is null. -->
    </span>

When Planning Price is null, the checkBindonce function in BindOnce is throwing an exception, as it's trying to find a then function on the controller value, which is null in this case.

To solve this, we can consider null a special case, as a guard against odd arguments. I'm open to alternative implementations, but I consider this pretty readable.

I used this UglifyJS site to create the bindonce.min.js file - http://marijnhaverbeke.nl/uglifyjs

Thoughts?

@Pasvaz Pasvaz added the bug label Mar 22, 2014
@Narretz
Copy link

Narretz commented Mar 29, 2014

Just a head's up, you don't have to add the minified file in a pull request, there's usually a build process for that.

@chexxor
Copy link
Author

chexxor commented Mar 29, 2014

Do you want me to do some commit massaging?

Thanks for the info! I didn't know!
On Mar 29, 2014 8:10 AM, "Narretz" [email protected] wrote:

Just a head's up, you don't have to add the minified file in a pull
request, there's usually a build process for that.

Reply to this email directly or view it on GitHubhttps://github.com//pull/69#issuecomment-38995170
.

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.

3 participants