From 7788d7fc92fb437f2b468efb7d6cf5451f546900 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 30 Jun 2020 09:14:05 -0500 Subject: [PATCH] fix: syntax too cool --- packages/entity/package.json | 2 +- packages/entity/trait/registrar.js | 4 +++- packages/net/package.json | 2 +- packages/net/packet/registrar.js | 4 +++- packages/net/s13n/registrar.js | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/entity/package.json b/packages/entity/package.json index 7f5f35d..e3caea0 100644 --- a/packages/entity/package.json +++ b/packages/entity/package.json @@ -1,6 +1,6 @@ { "name": "@avocado/entity", - "version": "1.0.14", + "version": "1.0.15", "main": "index.js", "author": "cha0s", "license": "MIT", diff --git a/packages/entity/trait/registrar.js b/packages/entity/trait/registrar.js index e9fd4da..ed0cb65 100644 --- a/packages/entity/trait/registrar.js +++ b/packages/entity/trait/registrar.js @@ -46,4 +46,6 @@ registerHooks({ }, }, '@avocado/entity/trait/registrar'); -module.hot?.accept(['./traits.scwp'], () => hasMapped = false); +if (module.hot) { + module.hot.accept(['./traits.scwp'], () => hasMapped = false); +} diff --git a/packages/net/package.json b/packages/net/package.json index 3002607..caf3ccf 100644 --- a/packages/net/package.json +++ b/packages/net/package.json @@ -1,6 +1,6 @@ { "name": "@avocado/net", - "version": "1.0.7", + "version": "1.0.8", "main": "index.js", "author": "cha0s", "license": "MIT", diff --git a/packages/net/packet/registrar.js b/packages/net/packet/registrar.js index cbeae28..32bb6e5 100644 --- a/packages/net/packet/registrar.js +++ b/packages/net/packet/registrar.js @@ -20,4 +20,6 @@ export function idFrom(Packet) { return idFromRaw(packetTo.get(Packet)); } -module.hot?.accept(['./packets.scwp'], () => hasMapped = false); +if (module.hot) { + module.hot.accept(['./packets.scwp'], () => hasMapped = false); +} diff --git a/packages/net/s13n/registrar.js b/packages/net/s13n/registrar.js index f44d232..046d5d9 100644 --- a/packages/net/s13n/registrar.js +++ b/packages/net/s13n/registrar.js @@ -20,4 +20,6 @@ export function idFrom(Synchronized) { return idFromRaw(synchronizedTo.get(Synchronized)); } -module.hot?.accept(['./s13n.scwp'], () => hasMapped = false); +if (module.hot) { + module.hot.accept(['./s13n.scwp'], () => hasMapped = false); +}