Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageDraftV2 changeListener exception #169

Open
darrylyip opened this issue Feb 1, 2025 · 0 comments
Open

MessageDraftV2 changeListener exception #169

darrylyip opened this issue Feb 1, 2025 · 0 comments

Comments

@darrylyip
Copy link

// VERSION: @pubnub/chat 0.11.3

const draft = channel.createMessageDraftV2({
  userSuggestionSource: 'channel',
});

draft.addChangeListener((state: MessageDraftState) => {
    console.log('ON DRAFT CHANGE', state);
});

draft.update('Any text');

// This will yield an exception with message: Cannot read property 'tg' of undefined

When i wired up a V2 message draft, attach a changeListener and then try to update the draft, an exception is thrown. If i don't attach a changeListener, there is no exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant