Skip to content

Commit

Permalink
Fixing encryptedResponse result
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiro committed Mar 31, 2024
1 parent 68526f0 commit 400d37a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tapoCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class TAPOCamera extends OnvifCamera {

if (isSecureConnection) {
const encryptedResponse = json as TAPOCameraEncryptedResponse;
if (encryptedResponse.result.response) {
if (encryptedResponse.result?.response) {
const decryptedResponse = this.decryptResponse(
encryptedResponse.result.response
);
Expand Down
2 changes: 1 addition & 1 deletion src/types/tapo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export type TAPOCameraRequest =
| TAPOCameraEncryptedRequest;

export type TAPOCameraEncryptedResponse = {
result: {
result?: {
response: string;
};
};
Expand Down

0 comments on commit 400d37a

Please sign in to comment.