Nicolas Cannasse 5 years ago
parent
commit
fcb5b0a667
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/comp/cdb/Editor.hx

+ 1 - 1
hide/comp/cdb/Editor.hx

@@ -558,7 +558,7 @@ class Editor extends Component {
 			if (c == null)
 			if (c == null)
 				return;
 				return;
 			beginChanges();
 			beginChanges();
-			var err = sheet.addColumn(c, index + 1);
+			var err = sheet.addColumn(c, index == null ? null : index + 1);
 			endChanges();
 			endChanges();
 			if (err != null) {
 			if (err != null) {
 				modal.error(err);
 				modal.error(err);