We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1375ffc commit d1a296aCopy full SHA for d1a296a
src/sandbox.js
@@ -124,6 +124,18 @@ function Sandbox() {
124
);
125
}
126
127
+function checkQuery(queries) {
128
+ const suggestions = Object.values(queries).filter(Boolean);
129
+ const suggestion = Object.values(queries).find(Boolean);
130
+
131
+ const anotherSuggestion = suggestions.find(
132
+ (query) =>
133
+ query?.queryName && !query.snippet?.startsWith('// sorry, I failed'),
134
+ );
135
136
+ return anotherSuggestion ? anotherSuggestion : suggestion;
137
+}
138
139
function onSelectNode(node, { origin }) {
140
// onSelectNode can be triggered after onMouseLeave has already been called.
141
// This makes it impossible to clear hover state. That's why we maintain and
@@ -138,7 +150,8 @@ function onSelectNode(node, { origin }) {
150
rootNode: state.rootNode,
151
});
152
- const suggestion = Object.values(queries).find(Boolean);
153
+ const suggestion = checkQuery(queries);
154
142
155
if (!suggestion) {
143
156
return;
144
157
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments