From 49804a0fd803a2617d48091eeedd97e749812d3f Mon Sep 17 00:00:00 2001 From: Rick Zhou Date: Wed, 2 Dec 2020 08:48:52 -0800 Subject: [PATCH] copy the title of current page by default --- src/NewWindow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NewWindow.js b/src/NewWindow.js index 54a5d5a..c166300 100644 --- a/src/NewWindow.js +++ b/src/NewWindow.js @@ -110,7 +110,7 @@ class NewWindow extends React.PureComponent { // Check if the new window was succesfully opened. if (this.window) { - this.window.document.title = title + this.window.document.title = title || document.title this.window.document.body.appendChild(this.container) // If specified, copy styles from parent window's document.