Skip to content

Commit 1bceed3

Browse files
committed
fix(octra): logger.map function not found, extract full name without extension
1 parent 5054777 commit 1bceed3

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

apps/octra/src/app/core/shared/service/userInteractions.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class UserInteractionsService {
2020
return this._afteradd;
2121
}
2222

23-
private _elements: StatisticElem[];
23+
private _elements: StatisticElem[] = [];
2424

2525
get elements(): StatisticElem[] {
2626
return this._elements;

apps/octra/src/app/core/store/login-mode/annotation/annotation.effects.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,14 @@ export class AnnotationEffects {
222222
modeState.logging.startTime,
223223
modeState.logging.startReference
224224
);
225-
this.uiService.elements = modeState.logging.logs.map((a) =>
226-
StatisticElem.fromAny(a)
227-
);
225+
if (
226+
modeState.logging.logs &&
227+
Array.isArray(modeState.logging.logs)
228+
) {
229+
this.uiService.elements = modeState.logging.logs.map((a) =>
230+
StatisticElem.fromAny(a)
231+
);
232+
}
228233
this.uiService.addElementFromEvent(
229234
'octra',
230235
{ value: BUILD.version },
@@ -730,14 +735,15 @@ export class AnnotationEffects {
730735
'audio_url'
731736
)
732737
) {
733-
734738
const fileInfoAudio = FileInfo.fromURL(
735739
this.routingService.staticQueryParams['audio_url']
736740
);
737741

738742
inputs = [
739743
{
740-
filename: this.routingService.staticQueryParams['audio_name'] ?? fileInfoAudio.fullname,
744+
filename:
745+
this.routingService.staticQueryParams['audio_name'] ??
746+
fileInfoAudio.fullname,
741747
fileType: 'audio/wave',
742748
type: 'input',
743749
url: this.routingService.staticQueryParams['audio_url'],

libs/web-media/src/lib/data-info/file-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class FileInfo extends DataInfo {
101101
) {
102102
const extraction = extractFileNameFromURL(url);
103103
const result = new FileInfo(
104-
name ?? extraction.name,
104+
name ?? `${extraction.name}.${extraction.extension}`,
105105
type ?? this.getMimeTypeByExtension(extraction.extension),
106106
size ?? 0,
107107
undefined,

0 commit comments

Comments
 (0)