react-share icon indicating copy to clipboard operation
react-share copied to clipboard

Pinterest - Uncaught in Promise error

Open AnnieTaylorCHEN opened this issue 4 years ago • 1 comments

Console error as below:

Uncaught (in promise) ShareButton.js:63 
p.AssertionError {name: "AssertionError", actual: undefined, expected: true, operator: "==", message: "pinterest.media", …}
actual: undefined
expected: true
generatedMessage: false
message: "pinterest.media"
name: "AssertionError"
operator: "=="
stack: "AssertionError: pinterest.media↵    at https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:22054↵    at t.<anonymous> (https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:14854)↵    at https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:13013↵    at Object.next (https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:13118)↵    at https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:12054↵    at new Promise (<anonymous>)↵    at b (https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:11799)↵    at t.handleClick (https://www.p.com/component---src-templates-post-template-js-736d9008ef443c679b4d.js:1:14625)↵    at Object.o (https://d33wubrfki0l68.cloudfront.net/bundles/71cb3843703a5ee45e66ad46f15f11090768cb6e.js:1:122943)↵    at p (https://d33wubrfki0l68.cloudfront.net/bundles/71cb3843703a5ee45e66ad46f15f11090768cb6e.js:1:123086)"
__proto__: Error
constructor: ƒ (e)
__proto__: Object

Can someone help?

AnnieTaylorCHEN avatar Jan 16 '21 13:01 AnnieTaylorCHEN

It's because Pinterest has media as required props.

https://github.com/nygardk/react-share/blob/2f8e90646211b07868b3feb52b910cc096e517ad/src/PinterestShareButton.ts#L5-L10

pipech avatar May 18 '21 13:05 pipech