Skip to content

Commit c2c8127

Browse files
committed
chore: linting
1 parent be59a10 commit c2c8127

File tree

1 file changed

+34
-27
lines changed

1 file changed

+34
-27
lines changed

html/classhelper.js

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -127,43 +127,49 @@ class ClassHelper extends HTMLElement {
127127

128128
const initialRequestURL = ClassHelper.getRestURL(this.trackerBaseURL, this.helpurlProps);
129129

130-
ClassHelper.fetchTranslations().catch(error => {
131-
console.warn("Classhelper failed in translating.")
132-
console.error(error);
133-
});
130+
ClassHelper.fetchTranslations()
131+
.catch(error => {
132+
console.warn("Classhelper failed in translating.")
133+
console.error(error);
134+
});
134135

135-
this.fetchDropdowns().catch(error => {
136-
// Top level handling for dropdowns errors.
137-
console.error(error);
138-
});
136+
this.fetchDropdowns()
137+
.catch(error => {
138+
// Top level handling for dropdowns errors.
139+
console.error(error);
140+
});
139141

140142
const cleanUpClosure = () => {
143+
console.warn("Classhelper not intercepting helpurl.");
141144
this.removeEventListener("click", handleClickEvent);
142145
this.helpurl.removeEventListener("click", this.preventDefault);
143146
this.helpurl.setAttribute("onclick", this.helpurlScript);
144147
}
145148

146149
const handleClickEvent = (event) => {
147-
this.openPopUp(initialRequestURL, this.helpurlProps).catch(error => {
148-
// Top level error handling for openPopUp method.
149-
cleanUpClosure();
150-
});
150+
this.openPopUp(initialRequestURL, this.helpurlProps)
151+
.catch(error => {
152+
// Top level error handling for openPopUp method.
153+
cleanUpClosure();
154+
});
151155
};
152156

153157
const handleNextPageEvent = (event) => {
154-
this.pageChange(event.detail.value, this.helpurlProps).catch(error => {
155-
// Top level error handling for nextPage method.
156-
this.removeEventListener("nextPage", handleNextPageEvent);
157-
cleanUpClosure();
158-
});
158+
this.pageChange(event.detail.value, this.helpurlProps)
159+
.catch(error => {
160+
// Top level error handling for nextPage method.
161+
this.removeEventListener("nextPage", handleNextPageEvent);
162+
cleanUpClosure();
163+
});
159164
}
160165

161166
const handlePrevPageEvent = (event) => {
162-
this.pageChange(event.detail.value, this.helpurlProps).catch(error => {
163-
// Top level error handling for prevPage method.
164-
this.removeEventListener("prevPage", handlePrevPageEvent);
165-
cleanUpClosure();
166-
});
167+
this.pageChange(event.detail.value, this.helpurlProps)
168+
.catch(error => {
169+
// Top level error handling for prevPage method.
170+
this.removeEventListener("prevPage", handlePrevPageEvent);
171+
cleanUpClosure();
172+
});
167173
}
168174

169175
const handleValueSelectedEvent = (event) => {
@@ -174,11 +180,12 @@ class ClassHelper extends HTMLElement {
174180
const handleSearchEvent = (event) => {
175181
this.helpurlProps.pageIndex = 1;
176182
const searchURL = ClassHelper.getSearchURL(this.trackerBaseURL, this.helpurlProps, event.detail.value);
177-
this.searchEvent(searchURL, this.helpurlProps).catch(error => {
178-
// Top level error handling for searchEvent method.
179-
this.removeEventListener("search", handleSearchEvent);
180-
cleanUpClosure();
181-
});
183+
this.searchEvent(searchURL, this.helpurlProps)
184+
.catch(error => {
185+
// Top level error handling for searchEvent method.
186+
this.removeEventListener("search", handleSearchEvent);
187+
cleanUpClosure();
188+
});
182189
}
183190

184191
const handleSelectionEvent = (event) => {

0 commit comments

Comments
 (0)