Skip to content

Commit 3558851

Browse files
committed
fix project settings undefined bug
Signed-off-by: Matt Wrock <matt@mattwrock.com>
1 parent 8fdd1fc commit 3558851

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

components/builder-web/app/shared/project-settings/project-settings.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,10 @@ export class ProjectSettingsComponent implements OnChanges, OnDestroy, AfterView
411411

412412
settingChanged(setting) {
413413
this.visibility = setting;
414-
this.store.dispatch(setCurrentPackageVisibility(this.origin, this.name, this.visibility, this.token));
414+
const params = this.store.getState().router.route.params;
415+
const origin = this.origin || params.origin;
416+
const name = this.name || params.name;
417+
this.store.dispatch(setCurrentPackageVisibility(origin, name, this.visibility, this.token));
415418
}
416419

417420
refresh() {

0 commit comments

Comments
 (0)