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' ;
22import { warn } from './utils' ;
33// eslint-disable-next-line @typescript-eslint/no-explicit-any
44export async function safeWrapper < T extends ( ...args : Array < any > ) => any > (
@@ -155,11 +155,11 @@ export function createLink(info: {
155155 for ( let i = 0 ; i < links . length ; i ++ ) {
156156 const l = links [ i ] ;
157157 const linkHref = l . getAttribute ( 'href' ) ;
158- const linkRef = l . getAttribute ( 'ref ' ) ;
158+ const linkRel = l . getAttribute ( 'rel ' ) ;
159159 if (
160160 linkHref &&
161161 isStaticResourcesEqual ( linkHref , info . url ) &&
162- linkRef === info . attrs [ 'ref ' ]
162+ linkRel === info . attrs [ 'rel ' ]
163163 ) {
164164 link = l ;
165165 needAttach = false ;
You can’t perform that action at this time.
0 commit comments