Commit a38625fd authored by Joseph Suárez's avatar Joseph Suárez Committed by Carlos Azuaje
Browse files

fix(actions/index.js): Fix exports (#13)

parent ba7c627b
import io from '../helpers/io'
function readFileChunk (ctx, offset, length) {
export const readFileChunk = (ctx, offset, length) => {
let end_offset = offset + length;
if (end_offset > ctx.props.file.size)
end_offset = ctx.props.file.size;
......@@ -17,7 +16,7 @@ function readFileChunk (ctx, offset, length) {
r.readAsArrayBuffer(ctx.props.file.slice(offset, end_offset));
}
const onReadSuccess = (ctx, offset, length, data) => {
export const onReadSuccess = (ctx, offset, length, data) => {
// Read success callback
if (ctx.state.done) return;
......@@ -49,7 +48,7 @@ const onReadSuccess = (ctx, offset, length, data) => {
}
};
function onReadError(ctx, message) {
export const onReadError = (ctx, message) => {
// Read error callback
ctx.setState({
progress: {
......@@ -60,10 +59,4 @@ function onReadError(ctx, message) {
invalid: true
});
}
module.exports = {
readFileChunk,
onReadSuccess,
onReadError
};
\ No newline at end of file
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment