Skip to content

Instantly share code, notes, and snippets.

@codebanesr
Last active June 3, 2020 18:45
Show Gist options
  • Save codebanesr/c2ab427d80ab93bc239f638c208debd9 to your computer and use it in GitHub Desktop.
Save codebanesr/c2ab427d80ab93bc239f638c208debd9 to your computer and use it in GitHub Desktop.
handleData(data: any) {
  if(data.uniqueId === CobrowsingformComponent.uniqueId) {
    console.log("same id returning", CobrowsingformComponent.uniqueId, data.uniqueId)
    return;
  }

  if(CobrowsingformComponent.prevSequenceNumberReceived >= data.nextsequenceNumber) {
    return;
  }

  CobrowsingformComponent.prevSequenceNumberReceived = data.nextsequenceNumber;
  CobrowsingformComponent.mysequenceNumber -= 10;
  this.validateForm.patchValue(data.change);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment