Skip to content

Commit

Permalink
Removed redundant part of code #7031
Browse files Browse the repository at this point in the history
  • Loading branch information
wszymanski committed Jul 22, 2020
1 parent 1f938be commit 359b1ae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1184,15 +1184,12 @@ export default function Core(rootElement, userSettings, rootInstanceSymbol = fal
if (instance.dataType === 'array' && (!tableMeta.columns || tableMeta.columns.length === 0) &&
tableMeta.allowInsertColumn) {
const prop = changes[i][1];
let propToColResult = datamap.propToCol(changes[i][1]);
const propToColResult = datamap.propToCol(prop);
// Populated data may contain indexes beyond current table boundaries.
let column = propToColResult !== null ? propToColResult : prop;
const column = propToColResult !== null ? propToColResult : prop;

while (column > instance.countCols() - 1) {
const numberOfCreatedColumns = datamap.createCol(void 0, void 0, source);
// Next column indexes for properties.
propToColResult = datamap.propToCol(prop);
column = propToColResult !== null ? propToColResult : prop;

if (numberOfCreatedColumns >= 1) {
metaManager.createColumn(null, numberOfCreatedColumns);
Expand Down

0 comments on commit 359b1ae

Please sign in to comment.