File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @module-federation/sdk ' : patch
3
+ ---
4
+
5
+ fix(sdk): createLink hook error dom attr rel
Original file line number Diff line number Diff line change 1
- import { CreateScriptHookDom , CreateScriptHookReturnDom } from './types' ;
1
+ import type { CreateScriptHookDom , CreateScriptHookReturnDom } from './types' ;
2
2
import { warn } from './utils' ;
3
3
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4
4
export async function safeWrapper < T extends ( ...args : Array < any > ) => any > (
@@ -155,11 +155,11 @@ export function createLink(info: {
155
155
for ( let i = 0 ; i < links . length ; i ++ ) {
156
156
const l = links [ i ] ;
157
157
const linkHref = l . getAttribute ( 'href' ) ;
158
- const linkRef = l . getAttribute ( 'ref ' ) ;
158
+ const linkRel = l . getAttribute ( 'rel ' ) ;
159
159
if (
160
160
linkHref &&
161
161
isStaticResourcesEqual ( linkHref , info . url ) &&
162
- linkRef === info . attrs [ 'ref ' ]
162
+ linkRel === info . attrs [ 'rel ' ]
163
163
) {
164
164
link = l ;
165
165
needAttach = false ;
You can’t perform that action at this time.
0 commit comments