mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
chore: bump blocksuite (#8230)
## 0.17.11
### Patch Changes
- [3c61be5](3c61be5ded): - Refactor drag handle widget
- Split embed blocks to `@blocksuite/affine-block-embed`
- Fix latex selected state in edgeless mode
- Fix unclear naming
- Fix prototype pollution
- Fix portal interaction in affine modal
- Fix paste linked block on edgeless
- Add scroll anchoring widget
- Add highlight selection
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { appInfo } from '@affine/electron-api';
|
||||
import { isNil } from 'lodash-es';
|
||||
|
||||
interface AppUrlOptions {
|
||||
desktop?: boolean | string;
|
||||
@@ -32,12 +33,24 @@ export function buildAppUrl(path: string, opts: AppUrlOptions = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
export function toURLSearchParams(params?: Record<string, string | string[]>) {
|
||||
export function toURLSearchParams(
|
||||
params?: Partial<Record<string, string | string[]>>
|
||||
) {
|
||||
if (!params) return;
|
||||
|
||||
const items = Object.entries(params)
|
||||
.filter(([_, v]) => !isNil(v))
|
||||
.filter(([_, v]) => {
|
||||
if (typeof v === 'string') {
|
||||
return v.length > 0;
|
||||
}
|
||||
if (Array.isArray(v)) {
|
||||
return v.length > 0;
|
||||
}
|
||||
return false;
|
||||
}) as [string, string | string[]][];
|
||||
|
||||
return new URLSearchParams(
|
||||
Object.entries(params).map(([k, v]) => [
|
||||
k,
|
||||
Array.isArray(v) ? v.join(',') : v,
|
||||
])
|
||||
items.map(([k, v]) => [k, Array.isArray(v) ? v.join(',') : v])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user