Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复DevTools引起的onLaunch参数丢失问题 (#1357)
Browse files Browse the repository at this point in the history
Co-authored-by: jhyi <[email protected]>
  • Loading branch information
juvham and juvham committed Nov 4, 2020
1 parent 1bfcd22 commit 9f65ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remax-plugin-devtools/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import WebSocket from './WebSocket';
export default {
onAppConfig({ config }: { config: any }) {
const originalLaunch = config.onLaunch;
config.onLaunch = function () {
config.onLaunch = function (...args: any) {
try {
console.log('尝试连接 React DevTools,请忽略连接错误信息,详情请参考 https://remaxjs.org/guide/basic/devtools');
connectToDevTools({
Expand All @@ -13,7 +13,7 @@ export default {
} catch (e) {
// ignore
}
originalLaunch.call(config);
originalLaunch.apply(config, args);
};

return config;
Expand Down

1 comment on commit 9f65ba9

@vercel
Copy link

@vercel vercel bot commented on 9f65ba9 Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.