diff --git a/samples/react-feedback/README.md b/samples/react-feedback/README.md index b59c5f27b..595c3e21b 100644 --- a/samples/react-feedback/README.md +++ b/samples/react-feedback/README.md @@ -9,13 +9,9 @@ This is an application that supports Feedback through a web part that can be use ## Compatibility ![SPFx 1.11](https://img.shields.io/badge/SPFx-1.11-green.svg) - ![Node.js LTS 10.x](https://img.shields.io/badge/Node.js-LTS%2010.x-green.svg) - ![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-red.svg) - ![Teams N/A](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg) - ![Workbench Not supported](https://img.shields.io/badge/Workbench-Not%20Supported-lightgrey.svg) @@ -34,13 +30,15 @@ This is an application that supports Feedback through a web part that can be use Solution|Author(s) --------|--------- -react-feedback | Perry Kankam +react-feedback | Perry Kankam +react-feedback | Abderahman Moujahid ## Version history Version|Date|Comments -------|----|-------- -1.0|December 15, 2020|Initial release +1.0.0|December 15, 2020|Initial release +1.0.1|March 3, 2021|Fix undefined listItem ## Disclaimer diff --git a/samples/react-feedback/config/package-solution.json b/samples/react-feedback/config/package-solution.json index 74c58f6be..32e31164e 100644 --- a/samples/react-feedback/config/package-solution.json +++ b/samples/react-feedback/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "feedback-webpart-client-side-solution", "id": "d5e255e1-7071-49a8-b50d-b06c80e4ac02", - "version": "1.0.0.0", + "version": "1.0.1.0", "includeClientSideAssets": true, "isDomainIsolated": false, "developer": { diff --git a/samples/react-feedback/src/webparts/feedback/FeedbackWebPart.ts b/samples/react-feedback/src/webparts/feedback/FeedbackWebPart.ts index 6cbb36a0c..6c55e7f59 100644 --- a/samples/react-feedback/src/webparts/feedback/FeedbackWebPart.ts +++ b/samples/react-feedback/src/webparts/feedback/FeedbackWebPart.ts @@ -50,7 +50,7 @@ export default class FeedbackWebPart extends BaseWebPart buttonLabel: escape(this.properties.buttonLabel), showCategory: showCategory, themeVariant: this.themeVariant, - listitemid: this.context.pageContext.listItem.id, //Replace with "1" if you're running this in a workbench + listitemid: !!this.context.pageContext.listItem ? this.context.pageContext.listItem.id : null, selectedCategory: escape(this.properties.feedbackCategory), currentUser: this.context.pageContext.user }