Skip to content

Commit

Permalink
Remove the TextDecoder/TextEncoder polyfill for some cases to fix tes…
Browse files Browse the repository at this point in the history
…ts (#1555)
  • Loading branch information
cmdcolin authored Dec 12, 2020
1 parent 2bd4697 commit e029db1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions products/jbrowse-web/src/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { AnyConfigurationModel } from '@jbrowse/core/configuration/configuration
import { types, Instance, SnapshotOut } from 'mobx-state-tree'
import { PluginConstructor } from '@jbrowse/core/Plugin'
import { FatalErrorDialog } from '@jbrowse/core/ui'
import { TextDecoder, TextEncoder } from 'fastestsmallesttextencoderdecoder'
import 'fontsource-roboto'
import 'requestidlecallback-polyfill'
import 'core-js/stable'
Expand All @@ -34,12 +33,6 @@ import packagedef from '../package.json'
import factoryReset from './factoryReset'
import StartScreen from './StartScreen'

if (!window.TextEncoder) {
window.TextEncoder = TextEncoder
}
if (!window.TextDecoder) {
window.TextDecoder = TextDecoder
}
function NoConfigMessage() {
const s = window.location.search
const links = [
Expand Down
4 changes: 0 additions & 4 deletions products/jbrowse-web/src/tests/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import rangeParser from 'range-parser' // eslint-disable-line import/no-extraneous-dependencies
import PluginManager from '@jbrowse/core/PluginManager'
import { TextDecoder, TextEncoder } from 'fastestsmallesttextencoderdecoder'
import JBrowseRootModelFactory from '../rootModel'
import configSnapshot from '../../test_data/volvox/config.json'
import corePlugins from '../corePlugins'
Expand Down Expand Up @@ -67,9 +66,6 @@ export function generateReadBuffer(getFileFunction) {
}

export function setup() {
if (!window.TextEncoder) window.TextEncoder = TextEncoder
if (!window.TextDecoder) window.TextDecoder = TextDecoder

window.requestIdleCallback = cb => cb()
window.cancelIdleCallback = () => {}
window.requestAnimationFrame = cb => setTimeout(cb)
Expand Down

0 comments on commit e029db1

Please sign in to comment.