mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the following code smells:
1) useState call is not destructured into value + setter pair. 2) A fragment with only one child is redundant. 3) Unnecessary '.apply()' and '.call()'. 4) Expected the Promise rejection reason to be an Error.
This commit is contained in:
@@ -42,7 +42,7 @@ export default function ObjectNodeProperties({panelId, node, treeNodeInfo, nodeD
|
||||
let warnOnCloseFlag = true;
|
||||
const confirmOnCloseReset = usePreferences().getPreferencesForModule('browser').confirm_on_properties_close;
|
||||
let updatedData = ['table', 'partition'].includes(nodeType) && !_.isEmpty(nodeData.rows_cnt) ? {rows_cnt: nodeData.rows_cnt} : undefined;
|
||||
let schema = node.getSchema.call(node, treeNodeInfo, nodeData);
|
||||
let schema = node.getSchema(treeNodeInfo, nodeData);
|
||||
|
||||
// We only have two actionTypes, 'create' and 'edit' to initiate the dialog,
|
||||
// so if isActionTypeCopy is true, we should revert back to "create" since
|
||||
|
||||
Reference in New Issue
Block a user