Skip to content

Commit 4b005ce

Browse files
Merge pull request #335 from preactjs/fix-hooks-detection
2 parents 15762ba + ca62aeb commit 4b005ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/adapter/hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export function createHook(port: PortPageHook): DevtoolsHook {
203203
if (preactVersionMatch.major == 10) {
204204
const supports = {
205205
renderReasons: !!config.Component,
206-
hooks: preactVersionMatch.minor >= 4 && preactVersionMatch.patch >= 1,
206+
hooks: (preactVersionMatch.minor === 4 && preactVersionMatch.patch >= 1) || preactVersionMatch.minor > 4,
207207
};
208208

209209
// Create an integer-based namespace to avoid clashing ids caused by

0 commit comments

Comments
 (0)