Skip to content

Commit 1bf6280

Browse files
authored
Allow the docs website to build again by re-declaring globals as local helpers (#1091)
Allows the docs website to build again by re-declaring globals used directly in template as local helper functions. Not sure which recent change has caused this but can assume it's a scoping change to the new template syntax. Have tested locally and also deployed a preview build from this branch (automatic for branches matching docs/*)
1 parent e4f0a0d commit 1bf6280

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

website/app/components/options-form.gjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export const DEFAULT_OPTIONS = {
4040
};
4141

4242
const eq = (a, b) => a === b;
43+
const values = Object.values;
44+
const stringify = JSON.stringify;
4345

4446
export default class OptionsFormComponent extends Component {
4547
@action
@@ -65,7 +67,7 @@ export default class OptionsFormComponent extends Component {
6567
<form aria-label='Upload options' {{on 'change' this.setOptions}}>
6668
<fieldset>
6769
<legend>Upload type:</legend>
68-
{{#each (Object.values UPLOAD_TYPES) as |type|}}
70+
{{#each (values UPLOAD_TYPES) as |type|}}
6971
<div>
7072
<input
7173
type='radio'
@@ -108,7 +110,7 @@ export default class OptionsFormComponent extends Component {
108110

109111
<label style={{this.toggleVisibility UPLOAD_TYPES.http}}>
110112
Headers:
111-
<textarea name='headers' rows='5' spellcheck='false'>{{JSON.stringify
113+
<textarea name='headers' rows='5' spellcheck='false'>{{stringify
112114
DEFAULT_HEADERS
113115
null
114116
2

0 commit comments

Comments
 (0)