Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Commit

Permalink
#18 Copy warning module into src
Browse files Browse the repository at this point in the history
  • Loading branch information
Minkyu Cho committed Feb 13, 2016
1 parent d7b2dd6 commit 44b2286
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Reduxible.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}) {
Expand Down
13 changes: 13 additions & 0 deletions src/warning.js
Original file line number Diff line number Diff line change
@@ -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 */
}

0 comments on commit 44b2286

Please sign in to comment.