Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/figma-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Figma = (() => {
// src/utils.ts
function toQueryParams(x) {
if (!x) return "";
return Object.entries(x).map(([k, v]) => k && v && `${k}=${encodeURIComponent(v)}`).filter(Boolean).join("&");
return Object.entries(x).map(([k, v]) => k && v != null && `${k}=${encodeURIComponent(v)}`).filter(Boolean).join("&");
}
var ApiError = class _ApiError extends Error {
constructor(error) {
Expand Down
2 changes: 1 addition & 1 deletion lib/figma-api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11668,7 +11668,7 @@ var API_VER_WEBHOOKS = "v2";
// src/utils.ts
function toQueryParams(x) {
if (!x) return "";
return Object.entries(x).map(([k, v]) => k && v && `${k}=${encodeURIComponent(v)}`).filter(Boolean).join("&");
return Object.entries(x).map(([k, v]) => k && v != null && `${k}=${encodeURIComponent(v)}`).filter(Boolean).join("&");
}
var ApiError = class _ApiError extends Error {
constructor(error) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AxiosError, Method as AxiosMethod, AxiosRequestConfig } from 'axios';
export function toQueryParams(x: any): string {
if (!x) return '';
return Object.entries(x).map(([ k, v ]) => (
k && v && `${k}=${encodeURIComponent(v as any)}`
k && (v != null) && `${k}=${encodeURIComponent(v as any)}`
)).filter(Boolean).join('&')
}

Expand Down