File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " idom-client-react" ,
33 "description" : " A client for IDOM implemented in React" ,
4- "version" : " 0.5.0 " ,
4+ "version" : " 0.5.1 " ,
55 "author" : " Ryan Morshead" ,
66 "license" : " MIT" ,
77 "repository" : {
Original file line number Diff line number Diff line change @@ -194,11 +194,15 @@ function eventHandler(sendEvent, eventSpec) {
194194 } ;
195195}
196196
197- function useLazyModule ( source , sourceUrl = "" ) {
197+ function useLazyModule ( source , sourceUrlBase = "" ) {
198198 const [ module , setModule ] = react . useState ( null ) ;
199199 if ( ! module ) {
200200 dynamicImport (
201- source . startsWith ( "./" ) ? sourceUrl + source . slice ( 2 ) : source
201+ source . startsWith ( "./" )
202+ ? ( sourceUrlBase . endsWith ( "/" )
203+ ? sourceUrlBase . slice ( 0 , - 1 )
204+ : sourceUrlBase ) + source . slice ( 1 )
205+ : source
202206 ) . then ( setModule ) ;
203207 }
204208 return module ;
You can’t perform that action at this time.
0 commit comments