mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
499fbc91a6
commit
e8e37fd094
2 changed files with 4 additions and 3 deletions
|
@ -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, {
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ describe('Astro Actions', () => {
|
|||
const data = devalue.parse(text);
|
||||
assert.equal(data, 'Hello, ben!');
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
describe('build', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue