diff --git a/lib/features/modeling/behavior/LabelBehavior.js b/lib/features/modeling/behavior/LabelBehavior.js index df87ebcd..5dc5a52e 100644 --- a/lib/features/modeling/behavior/LabelBehavior.js +++ b/lib/features/modeling/behavior/LabelBehavior.js @@ -25,6 +25,7 @@ var DEFAULT_LABEL_DIMENSIONS = { height: 20 }; +var NAME_PROPERTY = 'name'; /** * A component that makes sure that external labels are added @@ -48,8 +49,8 @@ export default function LabelBehavior( element = context.element, properties = context.properties; - if ('name' in properties) { - modeling.updateLabel(element, properties.name); + if (NAME_PROPERTY in properties) { + modeling.updateLabel(element, properties[NAME_PROPERTY]); } });