Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 16, 2025
1 parent fc7818c commit 0a61fd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 0 additions & 5 deletions apps/repl/app/routes/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ export default class EditRoute extends Route {
let hasFormat = qps.format !== undefined;

if (!hasCode) {
console.warn(
'URL contained no document information in the SearchParams. ' +
'Assuming glimdown and using the default sample snippet.'
);

/**
* Default starting doc is
* user-configurable.
Expand Down
9 changes: 8 additions & 1 deletion apps/repl/app/utils/editor-text.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable ember/classic-decorator-no-classic-methods */
import { isDestroyed, isDestroying, registerDestructor } from '@ember/destroyable';
import { inject as service } from '@ember/service';
import { buildWaiter, waitForPromise } from '@ember/test-waiters';
import { buildWaiter } from '@ember/test-waiters';
import { isTesting, macroCondition } from '@embroider/macros';

import { compressToEncodedURIComponent } from 'lz-string';
Expand Down Expand Up @@ -224,10 +224,17 @@ export class FileURIComponent {
if (macroCondition(isTesting())) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
base ??= (this.router as any) /* private API? */?.location?.path;
// @ts-expect-error private api
base = base.split('?')[0];
} else {
base ??= window.location.pathname;
}

/**
* At some point this added qps
* we don't want them though, so we'll strip them
*/

let next = `${base}?${qps}`;

this.router.replaceWith(next);
Expand Down

0 comments on commit 0a61fd8

Please sign in to comment.