From 16533e2d89a507b3ad85ea780d744689e112386c Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 14 Aug 2018 21:48:16 +0200 Subject: [PATCH] Work around messy architecture --- app/assets/javascripts/editor/editor.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 190f84e0..1e254dd3 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -150,11 +150,11 @@ configureEditors: function () { }, handlePasteEvent: function (pasteObject) { - var same = (this.lastCopyText === pasteObject.text); + var same = (CodeOceanEditor.lastCopyText === pasteObject.text); // if the text is not copied from within the editor (from any file), send an event to the backend if (!same) { - this.publishCodeOceanEvent({ + CodeOceanEditor.publishCodeOceanEvent({ category: 'editor_paste', data: pasteObject.text, exercise_id: $('#editor').data('exercise-id'),