Skip to content

Commit

Permalink
fix: init rsc data
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjun1011 committed Nov 16, 2023
1 parent be029be commit da8a791
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime/src/runRSCClientApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function runRSCClientApp(appConfig: AppConfig) {
DOMContentLoaded();
}

const rscData = (self as any).__rsc_data || [];
const rscData = (self as any).__rsc_data = (self as any).__rsc_data || [];
rscData.forEach(serverDataCallback);
rscData.push = serverDataCallback;

Expand Down
1 change: 1 addition & 0 deletions packages/runtime/src/runRSCServerApp.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { TextDecoder, TextEncoder } from 'util';
import * as React from 'react';
import * as ReactDOMServer from 'react-dom/server';
import { renderToPipeableStream } from 'react-server-dom-webpack/server.node';
Expand Down

0 comments on commit da8a791

Please sign in to comment.