Skip to content

Commit

Permalink
fix: watch URL がlive2→liveで番組作成判定失敗していた
Browse files Browse the repository at this point in the history
  • Loading branch information
koizuka committed Mar 18, 2021
1 parent 062f00a commit 8dfbc51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/nicolive-program/NicoliveClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ describe('webviews', () => {

// don't await
const result = expect(client.createProgram()).resolves.toBe('CREATED');
mock.browserWindow.loadURL(`https://live2.nicovideo.jp/watch/${programID}`);
mock.browserWindow.loadURL(`https://live.nicovideo.jp/watch/${programID}`);

await result;
expect(mock.browserWindow.close).toHaveBeenCalled();
Expand Down
2 changes: 1 addition & 1 deletion app/services/nicolive-program/NicoliveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class NicoliveClient {
private static frontendID = 134;

static isProgramPage(url: string): boolean {
return /^https?:\/\/live2\.nicovideo\.jp\/watch\/lv\d+/.test(url);
return /^https?:\/\/live2?\.nicovideo\.jp\/watch\/lv\d+/.test(url);
}

static isMyPage(url: string): boolean {
Expand Down

0 comments on commit 8dfbc51

Please sign in to comment.