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
2a84e764
Commit
2a84e764
authored
Nov 16, 2021
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applying reviewer's suggestion
parent
7dbdf10e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
app/assets/javascripts/editor/source_editor_instance.js
app/assets/javascripts/editor/source_editor_instance.js
+7
-8
No files found.
app/assets/javascripts/editor/source_editor_instance.js
View file @
2a84e764
...
@@ -100,14 +100,13 @@ export default class EditorInstance {
...
@@ -100,14 +100,13 @@ export default class EditorInstance {
static
useUnuse
(
extensionsStore
,
fn
,
extensions
)
{
static
useUnuse
(
extensionsStore
,
fn
,
extensions
)
{
if
(
Array
.
isArray
(
extensions
))
{
if
(
Array
.
isArray
(
extensions
))
{
if
(
!
extensions
.
length
)
{
/**
return
fn
.
call
(
this
,
extensionsStore
,
undefined
);
* We cut short if the Array is empty and let the destination function to throw
}
* Otherwise, we run the destination function on every entry of the Array
const
exts
=
new
Array
(
extensions
.
length
);
*/
extensions
.
forEach
((
ext
,
i
)
=>
{
return
extensions
.
length
exts
[
i
]
=
fn
.
call
(
this
,
extensionsStore
,
ext
);
?
extensions
.
map
(
fn
.
bind
(
this
,
extensionsStore
))
});
:
fn
.
call
(
this
,
extensionsStore
);
return
exts
;
}
}
return
fn
.
call
(
this
,
extensionsStore
,
extensions
);
return
fn
.
call
(
this
,
extensionsStore
,
extensions
);
}
}
...
...
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