Skip to content
Snippets Groups Projects
Commit 92c29a9b authored by OZGCloud's avatar OZGCloud
Browse files

OZG-768 fix adding attachments when none before

Using exported const EMPTY_ARRAY lead to getting frozen array which did not allow to push any new elements.
parent 5e0afbec
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen * Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen. * unter der Lizenz sind dem Lizenztext zu entnehmen.
*/ */
import { EMPTY_ARRAY, encodeUrlForEmbedding, isNotNull } from '@goofy-client/tech-shared'; import { encodeUrlForEmbedding, isNotNull } from '@goofy-client/tech-shared';
import { getEmbeddedResource, getUrl, Resource, ResourceUri } from '@ngxp/rest'; import { getEmbeddedResource, getUrl, Resource, ResourceUri } from '@ngxp/rest';
import { isNil } from 'lodash-es'; import { isNil } from 'lodash-es';
import { ApiError } from '../tech.model'; import { ApiError } from '../tech.model';
...@@ -84,7 +84,7 @@ export function getEmbeddedResources<T>( ...@@ -84,7 +84,7 @@ export function getEmbeddedResources<T>(
linkRel: string): T[] { linkRel: string): T[] {
if (isNil(stateResource) || isNil(stateResource.resource)) { if (isNil(stateResource) || isNil(stateResource.resource)) {
return EMPTY_ARRAY; return [];
} }
return getEmbeddedResource<T[]>(stateResource.resource, linkRel); return getEmbeddedResource<T[]>(stateResource.resource, linkRel);
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment