mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
chore(client): fix a type error in tests
This commit is contained in:
parent
c597ad7694
commit
7af44f609d
@ -6,7 +6,7 @@ type ToolbarConfig = string | "|" | { items: ToolbarConfig[] };
|
|||||||
describe("CKEditor config", () => {
|
describe("CKEditor config", () => {
|
||||||
it("has same toolbar items for fixed and floating", () => {
|
it("has same toolbar items for fixed and floating", () => {
|
||||||
function traverseItems(config: ToolbarConfig): string[] {
|
function traverseItems(config: ToolbarConfig): string[] {
|
||||||
const result = [];
|
const result: (string | string[])[] = [];
|
||||||
if (typeof config === "object") {
|
if (typeof config === "object") {
|
||||||
for (const item of config.items) {
|
for (const item of config.items) {
|
||||||
result.push(traverseItems(item));
|
result.push(traverseItems(item));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user