open-vault/ui/app/helpers/path-or-array.js
Matthew Irish 572fb826be
UI aws engine tweaks (#5294)
* allow passing a path for options so that it can be extracted from the model

* add cred type selector for the aws generate form

* style hint text on generate creds form

* add tests for aws-credential adapter

* allow for the case where we might have zero ttl

* show error for TTL picker if a non-number is entered for the duration part of the TTL

* fix positioning of tooltips

* fix ttl rendering with invalid input for initialValue
2018-09-28 16:45:30 -05:00

11 lines
257 B
JavaScript

import { helper as buildHelper } from '@ember/component/helper';
export function pathOrArray([maybeArray, target]) {
if (Array.isArray(maybeArray)) {
return maybeArray;
}
return target.get(maybeArray);
}
export default buildHelper(pathOrArray);