dtdi / citetool

2 stars 0 forks source link

Duplicate Papers when using multiple search queries #23

Closed nieselo closed 3 years ago

nieselo commented 3 years ago

` const { paperList: oldItems } = this.state; //define oldItems before the .forEach

entries.forEach((entry) => {

  let newDOI = !oldItems.some((item) => item.doi === entry["prism:doi"]);

  if (newDOI) {

    // as before...

  };

});`
nieselo commented 3 years ago

@dtdi The above code solves the issue. Definition of oldItems has to be moved forward.