client, server: remove workarounds for legacy browsers

This commit is contained in:
Jesse Chan
2020-10-15 20:42:47 +08:00
parent cce56235b9
commit dbeecf8d69
3 changed files with 0 additions and 16 deletions
-11
View File
@@ -1,11 +0,0 @@
if (typeof Promise === 'undefined') {
// Rejection tracking prevents a common issue where React gets into an
// inconsistent state due to an error, but it gets swallowed by a Promise,
// and the user has no idea what causes React's erratic future behavior.
require('promise/lib/rejection-tracking').enable();
window.Promise = require('promise/lib/es6-extensions.js');
}
// Object.assign() is commonly used with React.
// It will use the native implementation if it's present and isn't buggy.
Object.assign = require('object-assign');
-1
View File
@@ -140,7 +140,6 @@
"nedb": "^1.8.0",
"node-sass": "^4.13.0",
"nodemon": "^2.0.5",
"object-assign": "4.1.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"pascal-case": "^3.1.1",
"passport": "^0.4.1",
-4
View File
@@ -7,10 +7,6 @@ class ServerEvent {
constructor(res: Response) {
this.res = res;
// Add 2kb padding for IE.
const padding = new Array(2049);
res.write(`:${padding.join(' ')}\n`);
}
emit<T extends keyof ServerEvents>(id: number, eventType: T, data: ServerEvents[T]) {