Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
juskek committed Jul 6, 2023
1 parent 56d3e77 commit 4c6a487
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/data/calculations/CalculationsRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CalculationsRepository implements ICalculationsRepository {
const data = await this.remoteDataSource.get({
ongoingCalculation: null,
});
console.log("data", data);

if (data["ongoingCalculation"] !== null) {
return JSON.parse(
data["ongoingCalculation"] as string
Expand All @@ -76,12 +76,10 @@ export class CalculationsRepository implements ICalculationsRepository {
try {
const ongoingCalculation = await this._getOngoingCalculation();
if (ongoingCalculation !== null) {
console.log("ongoingCalculation", ongoingCalculation);
return ongoingCalculation;
}
const oldCalculations = await this.getAllCalculations();
if (oldCalculations.length > 0) {
console.log("oldCalculations", oldCalculations);
return oldCalculations[0];
}
return null;
Expand Down

0 comments on commit 4c6a487

Please sign in to comment.