Skip to content

Commit

Permalink
Fix fetch import method
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBishop committed Feb 21, 2022
1 parent 14dd533 commit 1f7abde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

const NodeHelper = require("node_helper");
const fs = require("fs").promises;
const fetch = require("node-fetch");
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
const powerwall = require("./powerwall");
const path = require("path");
const nunjucks = require("./../../vendor/node_modules/nunjucks");
Expand Down

1 comment on commit 1f7abde

@gonzo-256
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! I'm so glad you have made this.

Please sign in to comment.