mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
* leverage isSectionHeader option to change component styling * update destination models to include new params * update form and details template to accommodate new fields * remove extra horizontal line * move is-empty-value to core addon and use in details template * remove leftover or conditional * update mirage and tests * update form tests
17 lines
402 B
JavaScript
17 lines
402 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { helper } from '@ember/component/helper';
|
|
|
|
export default helper(function isEmptyValue([value], { hasDefault = false }) {
|
|
if (hasDefault) {
|
|
value = hasDefault;
|
|
}
|
|
if (typeof value === 'object' && value !== null) {
|
|
return Object.keys(value).length === 0;
|
|
}
|
|
return value == null || value === '';
|
|
});
|