From e3b155635e9d9bb1f78921a2d0c6e67f527756f4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 5 Jan 2022 16:32:52 +0100 Subject: [PATCH] fix linting --- libs/remix-core-plugin/src/lib/gist-handler.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/gist-handler.ts b/libs/remix-core-plugin/src/lib/gist-handler.ts index bae3a2d60c..19f88b5a93 100644 --- a/libs/remix-core-plugin/src/lib/gist-handler.ts +++ b/libs/remix-core-plugin/src/lib/gist-handler.ts @@ -1,3 +1,4 @@ +/* global fetch */ 'use strict' import { Plugin } from '@remixproject/engine' @@ -13,7 +14,6 @@ const profile = { } export class GistHandler extends Plugin { - constructor () { super(profile) } @@ -37,7 +37,7 @@ export class GistHandler extends Plugin { setTimeout(() => resolve(value), 0) }, cancelFn: () => { - setTimeout(() => reject(), 0) + setTimeout(() => reject("Canceled"), 0) } } this.call('modal', 'modal', modalContent) @@ -113,9 +113,7 @@ export class GistHandler extends Plugin { obj['/' + 'gist-' + gistId + '/' + path] = data.files[element] }) this.call('fileManager', 'setBatchFiles', obj, 'workspace', true, async (errorSavingFiles: any) => { - if (!errorSavingFiles) { - const provider = await this.call('fileManager', 'getProviderByName', 'workspace') - } else { + if (errorSavingFiles) { const modalContent = { id: 'gisthandler', title: 'Gist load error', @@ -125,8 +123,6 @@ export class GistHandler extends Plugin { this.call('modal', 'modal', modalContent) } }) - - }) } } @@ -135,4 +131,4 @@ const getGistId = (str) => { var idr = /[0-9A-Fa-f]{8,}/ var match = idr.exec(str) return match ? match[0] : null -} \ No newline at end of file +}