mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-20 06:01:10 +02:00
* update transforms * glimmer transform alphabet * move alphabet edit * license info and remove block error * logo edition * not found * Update ui/app/components/logo-edition.js Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com> * ad js docs --------- Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
29 lines
552 B
JavaScript
29 lines
552 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Transform from '@ember-data/serializer/transform';
|
|
import { isArray, A } from '@ember/array';
|
|
/*
|
|
This should go inside a globally available place for all apps
|
|
|
|
DS.attr('array')
|
|
*/
|
|
export default class ArrayTransform extends Transform {
|
|
deserialize(value) {
|
|
if (isArray(value)) {
|
|
return A(value);
|
|
} else {
|
|
return A();
|
|
}
|
|
}
|
|
serialize(value) {
|
|
if (isArray(value)) {
|
|
return A(value);
|
|
} else {
|
|
return A();
|
|
}
|
|
}
|
|
}
|