Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic authored and astrobot-houston committed Oct 4, 2024
1 parent 499fbc9 commit e8e37fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/astro/templates/actions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getActionQueryString,
} from 'astro:actions';

const ENCODED_DOT = "%2E";
const ENCODED_DOT = '%2E';

function toActionProxy(actionCallback = {}, aggregatedPath = '') {
return new Proxy(actionCallback, {
Expand All @@ -14,7 +14,8 @@ function toActionProxy(actionCallback = {}, aggregatedPath = '') {
return target[objKey];
}
// Add the key, encoding dots so they're not interpreted as nested properties.
const path = aggregatedPath + encodeURIComponent(objKey.toString()).replaceAll('.', ENCODED_DOT);
const path =
aggregatedPath + encodeURIComponent(objKey.toString()).replaceAll('.', ENCODED_DOT);
function action(param) {
return handleAction(param, path, this);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('Astro Actions', () => {
const data = devalue.parse(text);
assert.equal(data, 'Hello, ben!');
}
})
});
});

describe('build', () => {
Expand Down

0 comments on commit e8e37fd

Please sign in to comment.