Fix deprecations

This commit is contained in:
Zaid Abdulla committed 2020-10-25 23:34:05 -07:00
1 parent c8a6eb4c72
commit a43bba2405
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -17,7 +17,7 @@
* along with GenieACS. If not, see <http://www.gnu.org/licenses/>. * along with GenieACS. If not, see <http://www.gnu.org/licenses/>.
*/ */
import { Z_SYNC_FLUSH } from "zlib"; import { constants } from "zlib";
import Koa from "koa"; import Koa from "koa";
import Router from "koa-router"; import Router from "koa-router";
import * as jwt from "jsonwebtoken"; import * as jwt from "jsonwebtoken";
@@ -254,10 +254,10 @@ router.get("/", async (ctx) => {
koa.use( koa.use(
koaCompress({ koaCompress({
gzip: { gzip: {
flush: Z_SYNC_FLUSH, flush: constants.Z_SYNC_FLUSH,
}, },
deflate: { deflate: {
flush: Z_SYNC_FLUSH, flush: constants.Z_SYNC_FLUSH,
}, },
}) })
); );
+1 -1
View File
@@ -83,7 +83,7 @@ export function render(): Children {
} }
document.addEventListener("keydown", (e) => { document.addEventListener("keydown", (e) => {
if (overlayCallback && e.keyCode === 27 && close(overlayCallback, false)) if (overlayCallback && e.key === "Escape" && close(overlayCallback, false))
m.redraw(); m.redraw();
}); });