From 9d845d3a0b787345e08a266e18eb026ad422b00e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 9 Jan 2020 12:29:46 +0100 Subject: [PATCH] refactor(exam-correct): replace table constraint with better selector --- frontend/src/utils/exam-correct/exam-correct.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/utils/exam-correct/exam-correct.js b/frontend/src/utils/exam-correct/exam-correct.js index cc8705345..f3cb8d810 100644 --- a/frontend/src/utils/exam-correct/exam-correct.js +++ b/frontend/src/utils/exam-correct/exam-correct.js @@ -5,7 +5,7 @@ import { StorageManager, LOCATION } from '../../lib/storage-manager/storage-mana const EXAM_CORRECT_IDENT = 'uw-exam-correct'; @Utility({ - selector: `[${EXAM_CORRECT_IDENT}]`, + selector: `table[${EXAM_CORRECT_IDENT}]`, }) export class ExamCorrect { @@ -20,10 +20,6 @@ export class ExamCorrect { this._element = element; - if (this._element.tagName !== 'TABLE') { - throw new Error('Exam Correct utility can only be setup with a element!'); - } - } destroy() {