Browse Source

fixed file name issue when the page title is empty

Gildas 7 years ago
parent
commit
7a12ddf225
1 changed files with 1 additions and 1 deletions
  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();
 				title = titleElement.textContent.trim();
 			}
 			}
 			return {
 			return {
-				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?$/) : ""),
+				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?$/)[1] : ""),
 				content: this.dom.serialize()
 				content: this.dom.serialize()
 			};
 			};
 		}
 		}