If you close and reopen plaid link, it will keep on stacking iframes in dom. This fix destroys existing link handler before new one is created. According to plaid docs, calling destroy will make sure iframe is also removed.
Not sure if destroy should be called onExit, but checking other implementation (like react plaid), they are doing the check before create as well.
@cyrusstoller could you please check this and give me your thoughts? Thanks!
If you close and reopen plaid link, it will keep on stacking iframes in dom. This fix destroys existing link handler before new one is created. According to plaid docs, calling destroy will make sure iframe is also removed. Not sure if destroy should be called onExit, but checking other implementation (like react plaid), they are doing the check before create as well.
@cyrusstoller could you please check this and give me your thoughts? Thanks!