0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Fixed empty page from custom trigger button

no issue

- Custom trigger button with empty page value was not setting the default page
- Adds default page in case of no value
This commit is contained in:
Rish 2020-06-12 18:47:29 +05:30
parent e376c60764
commit 3e06a71dc8

View file

@ -109,7 +109,7 @@ export default class App extends React.Component {
// Handler for custom buttons // Handler for custom buttons
this.clickHandler = (event) => { this.clickHandler = (event) => {
const target = event.currentTarget; const target = event.currentTarget;
const page = target && target.dataset.membersTriggerButton; const page = (target && target.dataset.membersTriggerButton) || this.getDefaultPage();
event.preventDefault(); event.preventDefault();
this.onAction('openPopup', {page}); this.onAction('openPopup', {page});