Skip to content

Commit af870d7

Browse files
committed
Fix image converter under Node.js
1 parent 2a9aa08 commit af870d7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

heatshrink.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

imageconverter.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
/* Copyright 2020 Gordon Williams, [email protected]
1+
/* Copyright 2024 Gordon Williams, [email protected]
22
https://github.com/espruino/EspruinoWebTools
33
*/
44
(function (root, factory) {
5-
if (typeof define === 'function' && define.amd) {
6-
// AMD. Register as an anonymous module.
7-
define(['b'], factory);
8-
} else if (typeof module === 'object' && module.exports) {
5+
if (typeof module === 'object' && module.exports) {
96
// Node. Does not work with strict CommonJS, but
107
// only CommonJS-like environments that support module.exports,
118
// like Node.
12-
module.exports = factory(require('b'));
9+
module.exports = factory(root.heatshrink);
1310
} else {
1411
// Browser globals (root is window)
1512
root.imageconverter = factory(root.heatshrink);

0 commit comments

Comments
 (0)