Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bf44f562
Commit
bf44f562
authored
Apr 15, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes a bug where sometimes diff files would not render
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/327728
parent
69d3c36c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app/assets/javascripts/diffs/store/actions.js
app/assets/javascripts/diffs/store/actions.js
+4
-1
No files found.
app/assets/javascripts/diffs/store/actions.js
View file @
bf44f562
...
@@ -319,16 +319,19 @@ export const startRenderDiffsQueue = ({ state, commit }) => {
...
@@ -319,16 +319,19 @@ export const startRenderDiffsQueue = ({ state, commit }) => {
const
nextFile
=
diffFilesToRender
[
currentDiffFileIndex
];
const
nextFile
=
diffFilesToRender
[
currentDiffFileIndex
];
if
(
nextFile
)
{
if
(
nextFile
)
{
let
retryCount
=
0
;
currentDiffFileIndex
+=
1
;
currentDiffFileIndex
+=
1
;
commit
(
types
.
RENDER_FILE
,
nextFile
);
commit
(
types
.
RENDER_FILE
,
nextFile
);
const
requestIdle
=
()
=>
const
requestIdle
=
()
=>
requestIdleCallback
((
idleDeadline
)
=>
{
requestIdleCallback
((
idleDeadline
)
=>
{
// Wait for at least 5ms before trying to render
// Wait for at least 5ms before trying to render
if
(
idleDeadline
.
timeRemaining
()
>=
6
)
{
// or for 5 tries and then force render the file
if
(
idleDeadline
.
timeRemaining
()
>=
5
||
retryCount
>
4
)
{
checkItem
();
checkItem
();
}
else
{
}
else
{
requestIdle
();
requestIdle
();
retryCount
+=
1
;
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment