dispatchServerAction(action) { if (action.type == null) { console.warn('Undefined action.type', action); } this.dispatch({source: 'SERVER_ACTION', action}); }
this._asyncFSwrapper.readdir(tcwd).catch(err => { console.warn(err); if (this._noTracking === true && this.dirpath) { // #262 this.setFailedState(); setTimeout(() => { this.readFS(this.dirpath); }, 1000); } else { this.setFailedState(); } })
setTimeout(() => { try { requestAnimationFrame(window.mods.globe._animate); } catch(e) { // We probably got caught in a theme change. Print it out but everything should keep running fine. console.warn(e); } }, 1000 / 30);
async sendCommandToActiveTab(command) { const tabs = await this.tabsQuery({ active: true, currentWindow: true }); if (!tabs.length) { console.warn('No valid tab'); return; } this.dispatch({ type: 'CONTENT_UPLOAD', operation: null }); console.info('Sending message ', command); await this.tabsSendMessage(tabs[0].id, command); }
/** * Raise an error * @param {string} msg - The error message. */ function raiseErrorFn(msg, useConsole) { if (useConsole) { if (typeof console !== 'undefined') console.warn('MUI Warning: ' + msg); } else { throw new Error('MUI: ' + msg); } }
redirectToCheckout(event) { event.preventDefault() this.stripe.redirectToCheckout({ items: [{ sku: SKUs[this.state.amount], quantity: 1 }], successUrl: `https://lambstatus.github.io/donate?result=success`, cancelUrl: `https://lambstatus.github.io/donate?result=cancel`, }).then(({error}) => { if (error) { console.warn('Error:', error) } }) }
componentDidMount() { // Initialize Algolia search. // TODO Is this expensive? Should it be deferred until a user is about to search? // eslint-disable-next-line no-undef if (window.docsearch) { window.docsearch(siteConfig.docSearch) } else { console.warn('Search has failed to load and now is being disabled') this.setState({ enabled: false }) } }
const useInjectReducer = ({ key, reducer, pluginId }) => { const context = React.useContext(ReactReduxContext); const reducerName = pluginId ? `${pluginId}_${key}` : key; React.useEffect(() => { console.warn( 'Warning: strapi.useInjectReducer will be removed in the next major release. \n Please update your code.' ); getInjectors(context.store).injectReducer(reducerName, reducer); }, []); }
this._asyncFSwrapper.readdir(tcwd).catch(err => { console.warn(err); if (this._noTracking === true && this.dirpath) { // #262 this.setFailedState(); setTimeout(() => { this.readFS(this.dirpath); }, 1000); } else { this.setFailedState(); } })
componentDidMount() { // Initialize Algolia search. // TODO Is this expensive? Should it be deferred until a user is about to search? // eslint-disable-next-line no-undef if (window.docsearch) { window.docsearch(siteConfig.docSearch) } else { console.warn('Search has failed to load and now is being disabled') this.setState({ enabled: false }) } }
setTimeout(() => { try { requestAnimationFrame(window.mods.globe._animate); } catch(e) { // We probably got caught in a theme change. Print it out but everything should keep running fine. console.warn(e); } }, 1000 / 30);
/** * Raise an error * @param {string} msg - The error message. */ function raiseErrorFn(msg, useConsole) { if (useConsole) { if (typeof console !== 'undefined') console.warn('MUI Warning: ' + msg); } else { throw new Error('MUI: ' + msg); } }
/** * Raise an error * @param {string} msg - The error message. */ function raiseErrorFn(msg, useConsole) { if (useConsole) { if (typeof console !== 'undefined') console.warn('MUI Warning: ' + msg); } else { throw new Error('MUI: ' + msg); } }
/** * Raise an error * @param {string} msg - The error message. */ function raiseErrorFn(msg, useConsole) { if (useConsole) { if (typeof console !== 'undefined') console.warn('MUI Warning: ' + msg); } else { throw new Error('MUI: ' + msg); } }