Skip to content

Commit

Permalink
release: ykfe-utils@3.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuang committed Mar 19, 2020
1 parent 66306ee commit 3ca7b0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ykfe-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ykfe-utils",
"version": "3.5.8",
"version": "3.5.9",
"description": "utils for ykfe",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
8 changes: 6 additions & 2 deletions packages/ykfe-utils/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ const reactToStream = (Component: React.FunctionComponent, props: object, config
if (config.useReactToString) {
return reactRenderToString(React.createElement(Component, props))
} else {
const renderToString = require(BASE_DIR + '/node_modules/rax-server-renderer').renderToString
return config.isRax ? renderToString(React.createElement(Component, props)) : renderToNodeStream(React.createElement(Component, props))
if (config.isRax) {
const renderToString = require(BASE_DIR + '/node_modules/rax-server-renderer').renderToString
return renderToString(React.createElement(Component, props))
} else {
return renderToNodeStream(React.createElement(Component, props))
}
}
}

Expand Down

0 comments on commit 3ca7b0c

Please sign in to comment.