Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
modern.js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
importd
modern.js
Commits
c3e73b46
Unverified
Commit
c3e73b46
authored
5 months ago
by
zero
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: add getInitData api (#6707)
parent
a7a45731
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/afraid-walls-do.md
+6
-0
6 additions, 0 deletions
.changeset/afraid-walls-do.md
packages/runtime/plugin-runtime/src/core/compatible.tsx
+3
-0
3 additions, 0 deletions
packages/runtime/plugin-runtime/src/core/compatible.tsx
with
9 additions
and
0 deletions
.changeset/afraid-walls-do.md
0 → 100644
+
6
−
0
View file @
c3e73b46
---
'
@modern-js/runtime'
:
patch
---
fix: add missing getInitData api
fix: 添加缺失的 getInitData 接口
This diff is collapsed.
Click to expand it.
packages/runtime/plugin-runtime/src/core/compatible.tsx
+
3
−
0
View file @
c3e73b46
...
...
@@ -234,6 +234,9 @@ export const useRuntimeContext = () => {
request
:
baseSSRContext
.
request
||
({}
as
TSSRContext
[
'
request
'
]),
response
:
baseSSRContext
.
response
||
({}
as
TSSRContext
[
'
response
'
]),
logger
:
baseSSRContext
.
logger
||
({}
as
TSSRContext
[
'
logger
'
]),
getInitData
:
()
=>
{
return
Object
.
freeze
(
context
.
initialData
);
},
}
:
({}
as
TSSRContext
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment