Skip to content

Commit

Permalink
fix: uploading more than one file in a row now works
Browse files Browse the repository at this point in the history
Uploading a second file attempted to reupload all previously processed data. This clears the array of processed data each time an upload occurs so we aren't submitting duplicate records to the database.
  • Loading branch information
ardouglass committed Apr 27, 2020
1 parent cc88657 commit 7d018c4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion address-mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 5.4
* Tested up to: 5.4
* Version: 1.0.1
* Version: 1.0.2
*/

// If this file is called directly, abort.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardouglass/address-mapper",
"version": "1.0.1",
"version": "1.0.2",
"description": "A WordPress plugin that allows users to upload CSVs of addresses, and then query them using a custom endpoint of the WordPress REST API.",
"type": "wordpress-plugin",
"require": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/store/addresses/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function addressesReducer(state = {}, {type, payload}) {
case 'COMPLETED_PROCESSING_FILE':
return {
...state,
readyToUpload: [],
processing: {
...state.processing,
errorsProcessing: !payload.successful,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "address-mapper",
"version": "1.0.1",
"version": "1.0.2",
"description": "A WordPress plugin that allows users to upload CSVs of addresses, and then query them using a custom endpoint of the WordPress REST API.",
"private": true,
"scripts": {
Expand Down

0 comments on commit 7d018c4

Please sign in to comment.