Skip to content

Commit

Permalink
Feature was not working when swarm folder only had one file. This is …
Browse files Browse the repository at this point in the history
…the fix for that. (#75)

Improving log message
  • Loading branch information
JoaoSRaposo authored Oct 15, 2024
1 parent 943f2fb commit eddbe46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fileactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ registerFileAction(AddUnviewAction);
let previousPathHasSwarm = false;

subscribe('files:list:updated', (data) => {
console.log('JR-files:list:updated');
console.log('Hejbit-files:list:updated');

if (data.contents.length > 1){
if (data.contents.length >= 1){
if (previousPathHasSwarm && !data.contents[1]._data.attributes["ethswarm-node"]){
previousPathHasSwarm = false;
window.location.reload();
Expand All @@ -281,3 +281,4 @@ subscribe('files:list:updated', (data) => {
}

});

0 comments on commit eddbe46

Please sign in to comment.