mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
7c7c4962f9
no issue - bump deps - adjust usage for breaking changes... - https://github.com/cibernox/ember-power-select/blob/master/CHANGELOG.md#300-beta1 - https://github.com/cibernox/ember-basic-dropdown/blob/master/CHANGELOG.md#200-beta3 - https://github.com/cibernox/ember-power-datepicker/blob/master/CHANGELOG.md#070 - update overridden component and template files to match latest addon code - switch to class syntax w/decorators - adjust for angle bracket syntax
14 lines
275 B
JavaScript
14 lines
275 B
JavaScript
import {computed} from '@ember/object';
|
|
|
|
export default function computedFallbackIfUndefined(fallback) {
|
|
return computed({
|
|
get() {
|
|
return fallback;
|
|
},
|
|
|
|
set(_, v) {
|
|
return v === undefined ? fallback : v;
|
|
}
|
|
});
|
|
}
|