Fix change layer api functions

This commit is contained in:
Alexis Faizeau 2021-10-29 23:16:36 +02:00
parent 145117dc58
commit d4470568ec

View File

@ -94,7 +94,7 @@ export class WorkadventureRoomCommands extends IframeApiContribution<Workadventu
onEnterLayer(layerName: string): Subject<void> {
let subject = enterLayerStreams.get(layerName);
if (subject === undefined) {
subject = new Subject<ChangeLayerEvent>();
subject = new Subject<void>();
enterLayerStreams.set(layerName, subject);
}
@ -104,7 +104,7 @@ export class WorkadventureRoomCommands extends IframeApiContribution<Workadventu
onLeaveLayer(layerName: string): Subject<void> {
let subject = leaveLayerStreams.get(layerName);
if (subject === undefined) {
subject = new Subject<ChangeLayerEvent>();
subject = new Subject<void>();
leaveLayerStreams.set(layerName, subject);
}