import { call } from 'pimelon-ui' export const silentCall = (method: string): Promise => { // To prevent console errors/logs from being shown // when method doesn't exist in older versions of Melon const originalError = console.error const originalLog = console.log console.error = () => {} console.log = () => {} return call(method).catch(() => {}).finally(() => { console.log = originalLog console.error = originalError }) }