diff --git a/src/core/js/edit_mode.js b/src/core/js/edit_mode.js
index d7dcf93f547faff2610c61d43a60043c34145439..96ff91d2d9a2a6e153b56e8f6b66b6669f93a70b 100644
--- a/src/core/js/edit_mode.js
+++ b/src/core/js/edit_mode.js
@@ -542,7 +542,9 @@ var edit_mode = new function() {
             this.make_input("description", getEntityDescription(entity)),
         ];
         if (getEntityRole(roleElem[0]) == "Property") {
-            for (const input of this.make_datatype_input(getEntityDatatype(entity), getEntityUnit(entity))) {
+            // TODO refactor getEntityUnit and use that
+            var unit = getEntityHeadingAttribute(entity, "unit");
+            for (const input of this.make_datatype_input(getEntityDatatype(entity), unit)) {
                 inputs.push(input);
             }
             temp.hide();