Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
c810730b
Unverified
Commit
c810730b
authored
Apr 02, 2020
by
Robert Knight
Committed by
GitHub
Apr 02, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1986 from hypothesis/remove-module-exports
Replace `module.exports` with ES exports
parents
f23e8c8c
d63b9d48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
cross-origin-rpc.js
src/sidebar/cross-origin-rpc.js
+2
-7
service-context.js
src/sidebar/util/service-context.js
+1
-1
No files found.
src/sidebar/cross-origin-rpc.js
View file @
c810730b
...
...
@@ -48,7 +48,7 @@ function isJsonRpcMessage(data) {
* All methods called upon must be mapped in the `registeredMethods` function.
*/
// @ngInject
function
start
(
store
,
settings
,
$window
)
{
export
function
startServer
(
store
,
settings
,
$window
)
{
const
methods
=
registeredMethods
(
store
);
// Process the pre-start incoming RPC requests
...
...
@@ -128,11 +128,6 @@ function preStartMessageListener(event) {
*
* @param {Window} window_ - Test seam
*/
function
preStart
(
window_
=
window
)
{
export
function
preStartServer
(
window_
=
window
)
{
window_
.
addEventListener
(
'message'
,
preStartMessageListener
);
}
module
.
exports
=
{
preStartServer
:
preStart
,
startServer
:
start
,
};
src/sidebar/util/service-context.js
View file @
c810730b
...
...
@@ -52,7 +52,7 @@ export const ServiceContext = createContext(fallbackInjector);
* MyComponent.injectedProps = ['settings']
*
* // Wrap `MyComponent` to inject any services it needs.
*
module.exports =
withServices(MyComponent);
*
export default
withServices(MyComponent);
*/
export
function
withServices
(
Component
)
{
if
(
!
Component
.
injectedProps
)
{
...
...
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