FIX: Handle null flag values

This commit is contained in:
Robin Ward 2016-04-25 17:26:22 -04:00
parent 1a890fa9cf
commit 208cf41e6c
No known key found for this signature in database
GPG key ID: 0E091E2B4ED1B83D

View file

@ -91,7 +91,7 @@ const SiteHeaderComponent = MountWidget.extend({
buildArgs() {
return {
flagCount: _flagProperties.reduce((prev, cur) => prev + this.get(cur), 0),
flagCount: _flagProperties.reduce((prev, cur) => prev + (this.get(cur) || 0), 0),
topic: this._topic,
canSignUp: this.get('canSignUp')
};