From 83f140e4caf166cf094ed2083514078bc232a123 Mon Sep 17 00:00:00 2001 From: Humber <66655242+AcademicHumber@users.noreply.github.com> Date: Mon, 19 Apr 2021 16:05:38 -0400 Subject: [PATCH] Change the 'idKey' parameter's default value (#30502) I think it is easier for beginners to use the function, because the default value for the id key is 'id', not 'key' --- .../docs/tutorials/using-wordpress-menus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-source-wordpress/docs/tutorials/using-wordpress-menus.md b/packages/gatsby-source-wordpress/docs/tutorials/using-wordpress-menus.md index 256d8db8ac98e..66dbb24003937 100644 --- a/packages/gatsby-source-wordpress/docs/tutorials/using-wordpress-menus.md +++ b/packages/gatsby-source-wordpress/docs/tutorials/using-wordpress-menus.md @@ -163,7 +163,7 @@ To do this, we can use a function like the following: ```javascript const flatListToHierarchical = ( data = [], - { idKey = "key", parentKey = "parentId", childrenKey = "children" } = {} + { idKey = "id", parentKey = "parentId", childrenKey = "children" } = {} ) => { const tree = [] const childrenOf = {}