From 76420beac1990dc3891e8df5b0f8059c7b40e905 Mon Sep 17 00:00:00 2001 From: Ganuta Aleksey Date: Sat, 11 May 2019 07:36:54 +0300 Subject: [PATCH] Make breadcrumbs label dynamic, they may be functions. --- src/breadcrumbComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/breadcrumbComponent.js b/src/breadcrumbComponent.js index 859a368..71b89b6 100644 --- a/src/breadcrumbComponent.js +++ b/src/breadcrumbComponent.js @@ -115,7 +115,7 @@ export default { routeLabel = breadcrumbLabel } - return routeLabel + return typeof routeLabel === 'function' ? routeLabel.call(this, this.$route) : routeLabel }, // Function resolves a utils object of the provided route