summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes.js
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-12-21 02:34:35 +0100
committerMatija Čupić <matteeyah@gmail.com>2017-12-21 02:34:35 +0100
commit8c449310e245083e72513ec3addd0d2355333127 (patch)
treea9ca028f0f19cab55e9d3d8afeffd58cc85bf192 /app/assets/javascripts/notes.js
parent52b4a74a73cbd0b13d46d0bcd9b063e36b520f05 (diff)
parent5d8d72f18e9329978987fcb046467ceacd13c3ab (diff)
downloadgitlab-ce-refactor-cluster-show-page.tar.gz
Merge branch 'master' into refactor-cluster-show-pagerefactor-cluster-show-page
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r--app/assets/javascripts/notes.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 042fe44e1c6..a2b8e6f6495 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -37,6 +37,12 @@ const MAX_VISIBLE_COMMIT_LIST_COUNT = 3;
const REGEX_QUICK_ACTIONS = /^\/\w+.*$/gm;
export default class Notes {
+ static initialize(notes_url, note_ids, last_fetched_at, view, enableGFM = true) {
+ if (!this.instance) {
+ this.instance = new Notes(notes_url, note_ids, last_fetched_at, view, enableGFM);
+ }
+ }
+
constructor(notes_url, note_ids, last_fetched_at, view, enableGFM = true) {
this.updateTargetButtons = this.updateTargetButtons.bind(this);
this.updateComment = this.updateComment.bind(this);