File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -167569,7 +167569,7 @@ function utils_formatConfig(opts) {
167569167569 var projectPkg = external_path_.resolve(process.cwd(), opts.config || 'package.json');
167570167570 var pgkData = {};
167571167571 if (fs_extra_lib.existsSync(projectPkg)) {
167572- var _options$document$tit, _ref, _opts$githubCorners;
167572+ var _options$document$tit, _ref, _opts$githubCorners, _pgkData$repository ;
167573167573 pgkData = fs_extra_lib.readJSONSync(projectPkg);
167574167574 if (pgkData['markdown-to-html']) {
167575167575 var mth = pgkData['markdown-to-html'];
@@ -167589,7 +167589,7 @@ function utils_formatConfig(opts) {
167589167589 options.document = _objectSpread2(_objectSpread2({}, options.document), pgkData.document);
167590167590 }
167591167591 options.document.title = (_options$document$tit = options.document.title) !== null && _options$document$tit !== void 0 ? _options$document$tit : pgkData.name;
167592- options['github-corners'] = (_ref = (_opts$githubCorners = opts['github-corners']) !== null && _opts$githubCorners !== void 0 ? _opts$githubCorners : options['github-corners']) !== null && _ref !== void 0 ? _ref : typeof pgkData.repository === 'string' ? pgkData.repository : pgkData.repository. url;
167592+ options['github-corners'] = (_ref = (_opts$githubCorners = opts['github-corners']) !== null && _opts$githubCorners !== void 0 ? _opts$githubCorners : options['github-corners']) !== null && _ref !== void 0 ? _ref : typeof pgkData.repository === 'string' ? pgkData.repository : typeof pgkData.repository === 'object' && (_pgkData$repository = pgkData.repository) !== null && _pgkData$repository !== void 0 && _pgkData$repository. url ? pgkData.repository.url : undefined ;
167593167593 }
167594167594 if (opts['github-corners'] && typeof opts['github-corners'] === 'string') {
167595167595 options['github-corners'] = opts['github-corners'].replace(/^git[+]/, '');
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ export function formatConfig(opts: Options) {
2222 options . document = { ...options . document , ...pgkData . document }
2323 }
2424 options . document . title = options . document . title ?? pgkData . name ;
25- options [ 'github-corners' ] = opts [ 'github-corners' ] ?? options [ 'github-corners' ] ?? ( typeof pgkData . repository === 'string' ? pgkData . repository : pgkData . repository . url ) ;
25+ options [ 'github-corners' ] = opts [ 'github-corners' ] ?? options [ 'github-corners' ] ?? (
26+ typeof pgkData . repository === 'string' ? pgkData . repository : ( typeof pgkData . repository === 'object' && pgkData . repository ?. url ? pgkData . repository . url : undefined )
27+ ) ;
2628 }
2729 if ( opts [ 'github-corners' ] && typeof opts [ 'github-corners' ] === 'string' ) {
2830 options [ 'github-corners' ] = opts [ 'github-corners' ] . replace ( / ^ g i t [ + ] / , '' )
You can’t perform that action at this time.
0 commit comments