From db4b0a6f384c4f0313321c1aecbefdb6a808226b Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Mon, 7 Dec 2020 15:28:25 -0500 Subject: [PATCH] Decaf cleanup: do not throw strings --- services/document-updater/app/js/DiffCodec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/document-updater/app/js/DiffCodec.js b/services/document-updater/app/js/DiffCodec.js index 428f46c1c6..bca22cd2b3 100644 --- a/services/document-updater/app/js/DiffCodec.js +++ b/services/document-updater/app/js/DiffCodec.js @@ -2,7 +2,6 @@ camelcase, handle-callback-err, new-cap, - no-throw-literal, */ const { diff_match_patch } = require('../lib/diff_match_patch') const dmp = new diff_match_patch() @@ -35,7 +34,7 @@ module.exports = { } else if (type === this.UNCHANGED) { position += content.length } else { - throw 'Unknown type' + throw new Error('Unknown type') } } callback(null, ops)