From 4eb6210c19b9410ebff90b09c87749736370b744 Mon Sep 17 00:00:00 2001 From: Szymon Cofalik Date: Tue, 13 Aug 2019 15:28:44 +0200 Subject: [PATCH] Fix: Fixed `Mapper` crashing in scenario where attribute element bound with marker is broken. --- src/conversion/mapper.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conversion/mapper.js b/src/conversion/mapper.js index 703f0e23e..0dc713f06 100644 --- a/src/conversion/mapper.js +++ b/src/conversion/mapper.js @@ -222,10 +222,12 @@ export default class Mapper { const names = this._elementToMarkerNames.get( element ); - names.delete( name ); + if ( names ) { + names.delete( name ); - if ( names.size == 0 ) { - this._elementToMarkerNames.delete( element ); + if ( names.size == 0 ) { + this._elementToMarkerNames.delete( element ); + } } }