Skip to content

Commit

Permalink
chore: fix name of completeRatio => completedRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed May 22, 2024
1 parent 386b38e commit 8c0ec49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ember/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ import { Request } from '@warp-drive/ember';
<template>
<Request @request={{@request}}>
<:loading as |state|>
<Spinner @percentDone={{state.completeRatio}} />
<Spinner @percentDone={{state.completedRatio}} />
<button {{on "click" state.abort}}>Cancel</button>
</:loading>
Expand Down
4 changes: 2 additions & 2 deletions packages/ember/src/-private/request-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ export class RequestLoadingState {
return (this.endTime || this.lastPacketTime) - this.startTime;
}

get completeRatio(): number {
get completedRatio(): number {
return this.sizeHint ? this.bytesLoaded / this.sizeHint : 0;
}

get remainingRatio(): number {
return 1 - this.completeRatio;
return 1 - this.completedRatio;
}

get duration(): number {
Expand Down

0 comments on commit 8c0ec49

Please sign in to comment.