mirror of https://github.com/hashicorp/consul
12 lines
298 B
JavaScript
12 lines
298 B
JavaScript
|
import ComputedProperty from '@ember/object/computed';
|
||
|
import computedFactory from 'consul-ui/utils/computed/factory';
|
||
|
|
||
|
export default class Catchable extends ComputedProperty {
|
||
|
catch(cb) {
|
||
|
return this.meta({
|
||
|
catch: cb,
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
export const computed = computedFactory(Catchable);
|