Skip to content

Commit

Permalink
Fix scope module warning in console
Browse files Browse the repository at this point in the history
  • Loading branch information
zerobias committed Apr 6, 2024
1 parent 57dad1f commit 76acca0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/evaluator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,15 @@ export async function evaluator(code: string) {
if ($version.getState() === 'master') {
const additionalLibs = await Promise.all([
fetchForest(effector),
$viewLib.getState() === 'react'
fetchPatronum(effector),
])
forest = additionalLibs[0]
patronum = additionalLibs[1]
} else {
const isVersionWithScopeModule =
parseInt($version.getState().slice(0, 2)) <= 22
if (isVersionWithScopeModule) {
effectorBindingSSR = await ($viewLib.getState() === 'react'
? fetchEffectorReactSSR({
effector,
...getShimDefinition(shim),
Expand All @@ -276,12 +284,8 @@ export async function evaluator(code: string) {
effector,
'solid-js': solidJs,
'solid-js/web': solidJsWeb,
}),
fetchPatronum(effector),
])
forest = additionalLibs[0]
effectorBindingSSR = additionalLibs[1]
patronum = additionalLibs[2]
}))
}
}
function initViewLib(apiMap, api) {
let env
Expand Down

0 comments on commit 76acca0

Please sign in to comment.