diff --git a/src/Reduxible.js b/src/Reduxible.js index 45a201f..31a312f 100644 --- a/src/Reduxible.js +++ b/src/Reduxible.js @@ -5,7 +5,7 @@ import createBrowserHistory from 'history/lib/createBrowserHistory'; import createHashHistory from 'history/lib/createHashHistory'; import createMemoryHistory from 'history/lib/createMemoryHistory'; import contextMiddleware from './contextMiddlerware'; -import warning from 'redux/lib/utils/warning'; +import warning from './warning'; export default class Reduxible { constructor(options = {}) { diff --git a/src/warning.js b/src/warning.js new file mode 100644 index 0000000..6d6477d --- /dev/null +++ b/src/warning.js @@ -0,0 +1,13 @@ +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +export default function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ +}