Skip to content

Commit 60d9c42

Browse files
committed
Bump 0.4.3
1 parent db4811b commit 60d9c42

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/actions.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Object.defineProperty(exports, "__esModule", {
44
value: true
55
});
6-
exports.endTimeout = exports.startTimeout = exports.END_TIMEOUT = exports.START_TIMEOUT = exports.place = exports.content = exports.keep = exports.toggle = exports.hide = exports.show = exports.PLACE = exports.CONTENT = exports.KEEP = exports.TOGGLE = exports.HIDE = exports.SHOW = undefined;
6+
exports.endTimeout = exports.startTimeout = exports.END_TIMEOUT = exports.START_TIMEOUT = exports.DELAY = exports.place = exports.content = exports.keep = exports.toggle = exports.hide = exports.show = exports.PLACE = exports.CONTENT = exports.KEEP = exports.TOGGLE = exports.HIDE = exports.SHOW = undefined;
77
exports.delay = delay;
88

99
var _reduxActions = require('redux-actions');
@@ -26,6 +26,7 @@ var keep = exports.keep = (0, _reduxActions.createAction)(KEEP);
2626
var content = exports.content = (0, _reduxActions.createAction)(CONTENT);
2727
var place = exports.place = (0, _reduxActions.createAction)(PLACE);
2828

29+
var DELAY = exports.DELAY = prefix('delay');
2930
var DEFAULT_DURATION = 1500;
3031
function delay(action) {
3132
var duration = arguments.length <= 1 || arguments[1] === undefined ? DEFAULT_DURATION : arguments[1];
@@ -36,7 +37,7 @@ function delay(action) {
3637
if (duration === true) {
3738
duration = DEFAULT_DURATION;
3839
}
39-
action.meta.delay = parseInt(duration);
40+
action.meta[DELAY] = parseInt(duration);
4041
return action;
4142
}
4243

lib/middleware.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function middleware(store) {
2828
token && clearTimeout(token);
2929
});
3030

31-
if (!action.meta || !action.meta.delay) {
31+
if (!action.meta || !action.meta[_actions.DELAY]) {
3232
return next(action);
3333
}
3434

@@ -42,10 +42,10 @@ function middleware(store) {
4242
next((0, _actions.endTimeout)({ name: name }));
4343

4444
// Dispatch original action
45-
delete action.meta['delay'];
45+
delete action.meta[_actions.DELAY];
4646
next(action);
4747
}
48-
}, action.meta.delay);
48+
}, action.meta[_actions.DELAY]);
4949

5050
// Store timeout token
5151
next((0, _actions.startTimeout)({ name: name, token: newToken }));

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-tooltip",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "A tooltip React component for Redux",
55
"main": "./lib/index.js",
66
"repository": {

0 commit comments

Comments
 (0)