Skip to content

Commit

Permalink
Completly disable console logging in jquery-migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaCWebDeveloper committed Apr 25, 2024
1 parent d122664 commit efb2d51
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/flow-client/src/app/red/mock-red.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,20 @@ export const createMockRed = (
jQuery(selector, context)) as typeof jQuery;
Object.assign(RED.$, jQuery);
// jQuery plugins
(RED.$ as typeof RED.$ & { migrateMute: boolean }).migrateMute = true;
applyJqueryMigrate(RED.$, window);
applyJqueryMigrate(
RED.$,
// migrateMute doesn't mute enough
Object.assign({}, window, {
console: {
warn: () => undefined,
error: () => undefined,
log: () => undefined,
info: () => undefined,
debug: () => undefined,
trace: () => undefined,
},
})
);
applyJqueryUi(RED.$);
const jQueryUi = RED.$ as typeof jQuery & {
widget: (name: string, widget: Record<string, unknown>) => void;
Expand Down

0 comments on commit efb2d51

Please sign in to comment.