Skip to content

Commit

Permalink
Fix #100
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Jun 5, 2024
1 parent 0efefd4 commit 9001281
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/SRCImage/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ export function priorityProp(
const [majorStr, minorStr] = version.split('.');
const major = Number.parseInt(majorStr, 10);
const minor = Number.parseInt(minorStr, 10);
if (major > 18 || (major === 18 && minor >= 3)) {
// In React 18.3.0 or newer, we must use camelCase
// prop to avoid "Warning: Invalid DOM property".
// See https://github.com/facebook/react/pull/25927

// https://github.com/vercel/next.js/commit/68d5a3892b4edf1b62e3ece4ada324065a96b6f3
if (major > 18) {
return { fetchPriority };
}
// In React 18.2.0 or older, we must use lowercase prop
Expand Down

0 comments on commit 9001281

Please sign in to comment.