refact: removed duplicate table validation

This commit is contained in:
root 2020-05-16 17:19:07 -05:00
parent a23336387b
commit 0e491bd762

View File

@ -47,19 +47,7 @@ class Node {
this.type = 'Node'
if (props.tables) {
try {
const validateTablesResponse = this._validateTables(props.tables)
if (validateTablesResponse.status === 'ERR') {
throw validateTablesResponse
} else {
let tables = []
if (!Array.isArray(props.tables)) tables = [props.tables]
else tables = props.tables
this.tables = tables
}
} catch (err) {
throw err
}
this.importTables(props.tables)
} else {
this.tables = []
}