Skip to content

Commit

Permalink
fix javascript lint issues (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored Dec 10, 2020
1 parent 211afbb commit a8dc344
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion webui/src/actions/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ class Objects {
const response = await apiRequest(`/repositories/${repoId}/branches/${branchId}/objects?${query}`, {
method: 'POST',
body: data,
}, {}, null, {});
});
if (response.status !== 201) {
throw new Error(await extractError(response));
}
Expand Down
2 changes: 1 addition & 1 deletion webui/src/components/ComparePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const ComparePage = ({repo, refId, compareRef, diff, diffPaginate, diffResults,

const paginator =(!diffResults.loading && !!diffResults.payload && diffResults.payload.pagination && diffResults.payload.pagination.has_more);
const showMergeCompleted = !!(mergeResults && mergeResults.payload);
const compareWith = !compareRef || (compareRef && refId.type === compareRef.type && refId.id === compareRef.id);
const compareWith = !compareRef || (refId.type === compareRef.type && refId.id === compareRef.id);
const alertText = diffResults.error || '';
return (
<div className="mt-3">
Expand Down
2 changes: 1 addition & 1 deletion webui/src/components/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ const merge = (path, entriesAtPath, diffResults) => {
const entryTypes = {};
const entries = [...entriesAtPath];

const paths = entries.filter(t => t.path_type === 'common_prefix').map(t => t.path)
const paths = entries.filter(t => t.path_type === 'common_prefix').map(t => t.path);
const relevantChanges = diffResults.filter(diff => isChildOf(path, diff.path));
for (let diff of relevantChanges) {
// get common prefix if needed
Expand Down
13 changes: 5 additions & 8 deletions webui/src/components/auth/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ export const EntityCreateButton = ({ createFn, resetFn, status, variant, buttonT
resetFn();
};

const onSubmit = () => {
if (disabled) return;
createFn(serializeForm(formRef));
};

useEffect(() => {
if (status.done) {
if (onDone !== null)
Expand All @@ -39,7 +34,6 @@ export const EntityCreateButton = ({ createFn, resetFn, status, variant, buttonT
}
}, [resetFn, createView, onDone, status.done]);


const content = (createView !== null && showCreateView) ? createView(status.payload) : children;
const showCreateButton = ((createView !== null && !showCreateView) || createView === null);

Expand All @@ -54,8 +48,11 @@ export const EntityCreateButton = ({ createFn, resetFn, status, variant, buttonT
formData[current.name] = current.value;
}
return formData;
}

};
const onSubmit = () => {
if (disabled) return;
createFn(serializeForm());
};
return (
<>
<Button variant={variant} onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion webui/src/components/auth/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const UsersPage = connect(
const deleteSelectedUsers = () => {
deleteUsers(checkedUsers);
handleClose();
}
};

useEffect(() => {
if (deletionStatus.done) {
Expand Down

0 comments on commit a8dc344

Please sign in to comment.