Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 5, 2024
1 parent 69ebe3e commit d332449
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions ember-resources/src/util/keep-latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,18 @@ export function keepLatest<Return = unknown>({ when, value: valueFn }: Options<R
return () => {
let value = valueFn();


if (when()) {
/**
* Initially, if we may as well return the value instead
* of the "previous" value is there is no previous yet.
*
* We check against undefined, because that's what
* `previous` is "initialized" to.
*
* And then we never enter this block again, because
* we will have previous values in future invocations of this
* Formula.
*/
* Initially, if we may as well return the value instead
* of the "previous" value is there is no previous yet.
*
* We check against undefined, because that's what
* `previous` is "initialized" to.
*
* And then we never enter this block again, because
* we will have previous values in future invocations of this
* Formula.
*/
if (previous === undefined && initial) {
initial = false;

Expand Down
2 changes: 1 addition & 1 deletion test-app/tests/utils/keep-latest/rendering-test.gts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { tracked } from '@glimmer/tracking';
// @ts-ignore @ember/helper does not provide types :(
import { fn, hash } from '@ember/helper';
import { renderSettled } from '@ember/renderer';
import { render, settled } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { renderSettled } from '@ember/renderer';
import { setupRenderingTest } from 'ember-qunit';

import { use } from 'ember-resources';
Expand Down

0 comments on commit d332449

Please sign in to comment.