diff --git a/apps/repl/app/routes/edit.ts b/apps/repl/app/routes/edit.ts index d9bcdb9e7..c26f197c8 100644 --- a/apps/repl/app/routes/edit.ts +++ b/apps/repl/app/routes/edit.ts @@ -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. diff --git a/apps/repl/app/utils/editor-text.ts b/apps/repl/app/utils/editor-text.ts index 0ae20ae41..9596303d8 100644 --- a/apps/repl/app/utils/editor-text.ts +++ b/apps/repl/app/utils/editor-text.ts @@ -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'; @@ -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);