Fix isEmpty check

The empty check returning true for all fields since only Formattable
fields have a html value.
We can additionally check for a format, which is set for all Formattable
fields.
pull/4338/head
Oliver Günther 9 years ago
parent fed571f854
commit bf8a495669
  1. 5
      frontend/app/components/work-packages/wp-single-view/single-view-wp.service.ts

@ -97,8 +97,9 @@ export class SingleViewWorkPackage {
); );
} }
var value = this.format(field); var value = this.format(field);
if (!value || !value.html || if (!value ||
field === 'spentTime' && this.workPackage[field] === 'PT0S') { (value.format && !value.html) ||
(field === 'spentTime' && this.workPackage[field] === 'PT0S')) {
return true; return true;
} }

Loading…
Cancel
Save