Преглед изворни кода

fixed file name issue when the page title is empty

Gildas пре 7 година
родитељ
комит
7a12ddf225
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -257,7 +257,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 				title = titleElement.textContent.trim();
 			}
 			return {
-				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?$/) : ""),
+				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?$/)[1] : ""),
 				content: this.dom.serialize()
 			};
 		}