Skip to content

Commit f99a3e2

Browse files
committed
remove named import
1 parent 12ff655 commit f99a3e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/utils/previewEntry.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ window.onunhandledrejection = async function onUnhandledRejection(event) {
148148
};
149149

150150
// Monkeypatch p5._friendlyError
151-
const { _report } = window.p5;
152-
if (_report) {
151+
const p5Call = window.p5;
152+
153+
if (p5Call) {
153154
window.p5._report = function resolvedReport(message, method, color) {
154155
const urls = Object.keys(window.objectUrls);
155156
const paths = Object.keys(window.objectPaths);
@@ -175,6 +176,6 @@ if (_report) {
175176
paths.forEach((path) => {
176177
newMessage = newMessage.replaceAll(path, window.objectPaths[path]);
177178
});
178-
_report.apply(window.p5, [newMessage, method, color]);
179+
p5Call.apply(window.p5, [newMessage, method, color]);
179180
};
180181
}

0 commit comments

Comments
 (0)