style(modeling): use constant instead of magic string

This commit is contained in:
Nico Rehwaldt 2018-06-06 14:31:31 +02:00
parent 2a940d9a82
commit 4ade805f3d
1 changed files with 3 additions and 2 deletions

View File

@ -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]);
}
});