From c34db47c0cf405207a2385bf2fba567c75a50bb2 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Fri, 29 Dec 2017 14:17:26 -0300 Subject: [PATCH] fix prettier loading --- website/static/worker2.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website/static/worker2.js b/website/static/worker2.js index c5a130a57..a0de30ff0 100644 --- a/website/static/worker2.js +++ b/website/static/worker2.js @@ -40,8 +40,14 @@ self.require = function require(path) { return self[path]; }; +var prettier; importScripts("lib/index.js"); -var prettier = index; // eslint-disable-line +if (typeof prettier === "undefined") { + prettier = module.exports; // eslint-disable-line +} +if (typeof prettier === "undefined") { + prettier = index; // eslint-disable-line +} var parsersLoaded = {};