Fixed an issue where the cycleway field would throw an error when added from the "Add field:" dropdown

This commit is contained in:
Quincy Morgan
2019-01-17 12:32:14 -05:00
parent 89e45225b8
commit 90637bdcfa
+4 -4
View File
@@ -8,7 +8,7 @@ import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util';
export function uiFieldCycleway(field, context) {
var dispatch = d3_dispatch('change');
var items = d3_select(null);
var wrap = d3_select(null);
function cycleway(selection) {
@@ -17,7 +17,7 @@ export function uiFieldCycleway(field, context) {
}
var wrap = selection.selectAll('.form-field-input-wrap')
wrap = selection.selectAll('.form-field-input-wrap')
.data([0]);
wrap = wrap.enter()
@@ -122,8 +122,8 @@ export function uiFieldCycleway(field, context) {
cycleway.focus = function() {
items.selectAll('.preset-input-cycleway')
.node().focus();
var node = wrap.selectAll('input').node();
if (node) node.focus();
};