From 3d666270ab249ff74cf6cc889993c6131aff9081 Mon Sep 17 00:00:00 2001 From: Paul Tiedtke Date: Sat, 20 Mar 2021 03:12:38 +0100 Subject: [PATCH] v1.3.2 --- dist/index.js | 6 +++--- dist/index.js.map | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8bd483d..57480d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -25,16 +25,16 @@ const getRoute = (routesConfig, path) => { }; const getTitle = (routesConfig, path, divider, titles = [], matchCache) => { const { route, currentMatch } = getRoute(routesConfig, path); - if (route) { + if (route && route.titleConcat !== false) { if (route.title) { titles.push(route.title); } - if (route.routes && route.titleConcat !== false) { + if (route.routes) { return getTitle(route.routes, path, divider, titles, currentMatch || matchCache); } } return { - title: titles.reverse().join(` ${divider} `), + title: route.titleConcat !== false ? titles.reverse().join(` ${divider} `) : route.title, titles, params: currentMatch ? currentMatch.params : matchCache.params, }; diff --git a/dist/index.js.map b/dist/index.js.map index 96f8521..3cb4b50 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iCAAkC;AAClC,+CAA6D;AAoB7D,MAAM,QAAQ,GAAG,CAAC,YAAoB,EAAE,IAAY,EAAuD,EAAE;IAC3G,IAAI,KAA0B,CAAC;IAC/B,IAAI,YAAmB,CAAC;IAExB,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC/B,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;YACxC,YAAY,GAAG,wBAAS,CAAC,IAAI,EAAE,WAA0B,CAAC,CAAC;YAC3D,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,MAAM,EAAE,GAAW,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,GA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,IAAI,CAAC,SAAS,CAAC,CACzB,EACD,QAAQ,CACT,CACF,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACf,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 3fe3204..09f8aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-router-title", - "version": "1.3.1", + "version": "1.3.2", "main": "dist/index.js", "types": "dist/index.d.ts", "author": "@lynoapp",