Bläddra i källkod

fixed file name issue when the page title is empty

Gildas 7 år sedan
förälder
incheckning
7a12ddf225
1 ändrade filer med 1 tillägg och 1 borttagningar
  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()
 			};
 		}