File tree 2 files changed +5
-3
lines changed
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) {
167569
167569
var projectPkg = external_path_.resolve(process.cwd(), opts.config || 'package.json');
167570
167570
var pgkData = {};
167571
167571
if (fs_extra_lib.existsSync(projectPkg)) {
167572
- var _options$document$tit, _ref, _opts$githubCorners;
167572
+ var _options$document$tit, _ref, _opts$githubCorners, _pgkData$repository ;
167573
167573
pgkData = fs_extra_lib.readJSONSync(projectPkg);
167574
167574
if (pgkData['markdown-to-html']) {
167575
167575
var mth = pgkData['markdown-to-html'];
@@ -167589,7 +167589,7 @@ function utils_formatConfig(opts) {
167589
167589
options.document = _objectSpread2(_objectSpread2({}, options.document), pgkData.document);
167590
167590
}
167591
167591
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 ;
167593
167593
}
167594
167594
if (opts['github-corners'] && typeof opts['github-corners'] === 'string') {
167595
167595
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) {
22
22
options . document = { ...options . document , ...pgkData . document }
23
23
}
24
24
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
+ ) ;
26
28
}
27
29
if ( opts [ 'github-corners' ] && typeof opts [ 'github-corners' ] === 'string' ) {
28
30
options [ 'github-corners' ] = opts [ 'github-corners' ] . replace ( / ^ g i t [ + ] / , '' )
You can’t perform that action at this time.
0 commit comments