Skip to content

Commit bcd6cc4

Browse files
yakov116fregante
andauthored
Lint and minor console errors fixes (#2869)
Co-authored-by: Federico Brigante <github@bfred.it>
1 parent e7f3bc2 commit bcd6cc4

7 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
33
Thanks for contributing! 🍄
44
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.rgh-no-navigation-highlight .list-group-item.navigation-focus, /* Notifications list */
22
.rgh-no-navigation-highlight .Box-row.navigation-focus, /* Issue list */
3-
.rgh-no-navigation-highlight .navigation-focus td { /* File list */
3+
.rgh-no-navigation-highlight .navigation-focus td { /* File list */
44
background: none !important;
55
}

source/features/improve-shortcut-help.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ const observer = new MutationObserver(([{target}]) => {
4545
});
4646

4747
function init(): void {
48-
document.addEventListener('keypress', ({key}) => {
49-
if (key === '?') {
50-
observer.observe(select('body > details > details-dialog')!, {childList: true});
48+
document.addEventListener('keypress', ({key, target}) => {
49+
if (key !== '?' || target instanceof HTMLTextAreaElement || target instanceof HTMLInputElement) {
50+
return;
51+
}
52+
53+
const modal = select('body > details > details-dialog');
54+
if (modal) {
55+
observer.observe(modal, {childList: true});
5156
}
5257
});
5358
}

source/features/pr-branches.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ async function init(): Promise<false | void> {
108108
]);
109109

110110
for (const prLink of prLinks) {
111+
if (!data.repository[prLink.id].headOwner) { // 👻 @ghost user
112+
return;
113+
}
114+
111115
let branches;
112116
let {base, head} = normalizeBranchInfo(data.repository[prLink.id]);
113117

source/features/selection-in-new-tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function init(): void {
1818

1919
features.add({
2020
id: __featureName__,
21-
description: 'Adds a keyboard shortcut to open selection in new tab when navigating via `j` and `k`: `Shift` `o`.',
21+
description: 'Adds a keyboard shortcut to open selection in new tab when navigating via `j` and `k`: `Shift` `o`.',
2222
screenshot: false,
2323
shortcuts: {
2424
'shift o': 'Open selection in new tab'

source/features/tags-dropdown.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/* Make dropdown smaller, if possible */
88
:root .rgh-tags-dropdown .select-menu-modal {
9-
width: max-content; /* Default: 300px */
9+
width: max-content; /* Default: 300px */
1010
min-width: 150px;
1111
max-width: 300px;
1212
}

source/libs/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ next to the name of the feature that caused them.
66
Usage:
77
88
import * as api from '../libs/api';
9-
const user = await api.v3(`users/${username}`);
9+
const user = await api.v3(`users/${username}`);
1010
const data = await api.v4('{user(login: "user") {name}}');
1111
1212
Returns:

0 commit comments

Comments
 (0)