Skip to content

Commit

Permalink
Revert "fix(hub-common): handle undefined context.portal (#1245)" (#1247
Browse files Browse the repository at this point in the history
)

This reverts commit 3ae3795.
  • Loading branch information
mjuniper authored Sep 27, 2023
1 parent 3ae3795 commit 941550e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- beta
# - alpha disabled to allow push to alpha then merge to master w/o incurring a release
- next
- '[0-9]+.[0-9]+.x'
# Dont run if it's just markdown or doc files
paths-ignore:
- "**.md"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
},
"release": {
"branches": [
"+([1-9])?(.{+([1-9]),x}).x",
"master",
{
"name": "next",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/sites/HubSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class HubSite
): IHubSite {
// ensure we have the orgUrlKey
if (!partialSite.orgUrlKey) {
partialSite.orgUrlKey = context.portal?.urlKey;
partialSite.orgUrlKey = context.portal.urlKey;
}
// extend the partial over the defaults
const pojo = { ...DEFAULT_SITE, ...partialSite } as IHubSite;
Expand Down
5 changes: 1 addition & 4 deletions packages/common/test/sites/HubSite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ describe("HubSite Class:", () => {
describe("static methods:", () => {
it("loads from minimal json", () => {
const createSpy = spyOn(HubSitesModule, "createSite");
const chk = HubSite.fromJson(
{ name: "Test Site" },
unauthdCtxMgr.context
);
const chk = HubSite.fromJson({ name: "Test Site" }, authdCtxMgr.context);

expect(createSpy).not.toHaveBeenCalled();
expect(chk.toJson().name).toEqual("Test Site");
Expand Down

0 comments on commit 941550e

Please sign in to comment.