Explorar el Código

fixed file name issue when the page title is empty

Gildas hace 7 años
padre
commit
7a12ddf225
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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()
 			};
 		}