Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
963eb2ff
Commit
963eb2ff
authored
8 years ago
by
Bryce Johnson
Browse files
Options
Download
Email Patches
Plain Diff
Clean up method order in subbable.
parent
bf37c477
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
app/assets/javascripts/subbable_resource.js.es6
app/assets/javascripts/subbable_resource.js.es6
+8
-6
No files found.
app/assets/javascripts/subbable_resource.js.es6
View file @
963eb2ff
...
...
@@ -51,6 +51,7 @@
};
this.init(pollCfg);
}
/* private methods */
init(pollCfg) {
...
...
@@ -92,12 +93,6 @@
return diff;
}
/* public methods */
subscribe(propToWatch, callback) {
this.addSubscriber(propToWatch, callback);
}
getResource() {
const totalSubscribers = Object.keys(this.subscribers).length;
if (!this.state.loading || !totalSubscribers) {
...
...
@@ -107,6 +102,13 @@
return this.get();
}
/* public methods */
subscribe(propToWatch, callback) {
this.addSubscriber(propToWatch, callback);
}
get() {
return this.resource.get()
.then((res) => this.updateState(res.data))
...
...
This diff is collapsed.
Click to expand it.
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