Skip to content

Commit 0e5fab1

Browse files
Fix lint error
1 parent 5491d12 commit 0e5fab1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

packages/next/client/script.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const LoadCache = new Set()
1010
export interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {
1111
strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive'
1212
id?: string
13-
onLoad?: () => void
14-
onError?: () => void
13+
onLoad?: (e: any) => void
14+
onError?: (e: any) => void
1515
children?: React.ReactNode
1616
}
1717

test/integration/script-loader/pages/page3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const Page = () => {
1616
strategy="lazyOnload"
1717
></Script>
1818
<Script
19-
src="https://somebrokenlink.doesntexist"
19+
src="https://example.com/doesntexist"
2020
strategy="lazyOnload"
2121
onError={(e) => {
22-
console.log('error');
23-
console.log(e);
22+
console.log('error')
23+
console.log(e)
2424
}}
2525
/>
2626
<div>page3</div>

test/integration/script-loader/test/index.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ describe('Script Loader', () => {
7070
await waitFor(1000)
7171

7272
const logs = await browser.log('browser')
73-
const filteredLogs = logs.filter((log) => !log.message.includes('Failed to load resource'))
73+
const filteredLogs = logs.filter(
74+
(log) => !log.message.includes('Failed to load resource')
75+
)
7476
expect(filteredLogs.length).toBe(0)
7577

7678
async function test(id) {

0 commit comments

Comments
 (0)