open-consul/ui-v2/app/helpers/service/exists.js

12 lines
245 B
JavaScript
Raw Normal View History

import { helper } from '@ember/component/helper';
export function serviceExists([item], hash) {
if (typeof item.InstanceCount === 'undefined') {
return false;
}
return item.InstanceCount > 0;
}
export default helper(serviceExists);