mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Fixed error when changing subscription access back to saved setting
no issue - if you switch back to the saved subscription access setting we attempted to use destructuring assignment from an `undefined` value - switched to using direct assignment and optional chaining
This commit is contained in:
parent
dee5129edf
commit
345cfd6f36
@ -104,7 +104,7 @@ export default class MembersAccessController extends Controller {
|
||||
|
||||
@action
|
||||
async membersSubscriptionAccessChanged() {
|
||||
const [oldValue] = this.settings.changedAttributes().membersSignupAccess;
|
||||
const oldValue = this.settings.changedAttributes().membersSignupAccess?.[0];
|
||||
|
||||
if (oldValue === 'none') {
|
||||
// when saved value is 'none' the server won't inject the portal script
|
||||
|
Loading…
Reference in New Issue
Block a user