From d3324494fc956ba8f23a725605034908e27f8bfa Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:49:26 -0500 Subject: [PATCH] lint:fix --- ember-resources/src/util/keep-latest.ts | 21 +++++++++---------- .../utils/keep-latest/rendering-test.gts | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ember-resources/src/util/keep-latest.ts b/ember-resources/src/util/keep-latest.ts index 5a603085e..b0729ee69 100644 --- a/ember-resources/src/util/keep-latest.ts +++ b/ember-resources/src/util/keep-latest.ts @@ -75,19 +75,18 @@ export function keepLatest({ when, value: valueFn }: Options { 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; diff --git a/test-app/tests/utils/keep-latest/rendering-test.gts b/test-app/tests/utils/keep-latest/rendering-test.gts index 2ce115753..fcddf02ca 100644 --- a/test-app/tests/utils/keep-latest/rendering-test.gts +++ b/test-app/tests/utils/keep-latest/rendering-test.gts @@ -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';