# Remove Page button not working

**URL:** <https://pdfjs.community/t/remove-page-button-not-working/220>\
**Category:** Bug Reports\
**Created:** [August 21, 2020, 4:34pm UTC](https://pdfjs.community/t/remove-page-button-not-working/220 "2020-08-21T16:34:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![honey.bhatnagar](https://avatars.discourse-cdn.com/v4/letter/h/c2a13f/32.png) [@honey.bhatnagar](https://pdfjs.community/u/honey.bhatnagar)\
**Post date:** [August 21, 2020, 4:34pm UTC](https://pdfjs.community/t/remove-page-button-not-working/220/1 "2020-08-21T16:34:17Z")

</div>

**Expected behaviour**  
The Confirmation Popup should close and the page should be remove

**Link to document**  
This issue is coming in the demo as well : [https://pdfjs.express/demo](https://pdfjs.express/demo)

**Code snippet**  
Error coming in Console :  
Uncaught TypeError: Cannot read property ‘then’ of undefined  
at Object.onConfirm (webviewer-ui.min.js:formatted:57274)  
at webviewer-ui.min.js:formatted:67683  
at Object.l (webviewer-ui.min.js:formatted:16219)  
at p (webviewer-ui.min.js:formatted:16237)  
at webviewer-ui.min.js:formatted:16246  
at v (webviewer-ui.min.js:formatted:16256)  
at at (webviewer-ui.min.js:formatted:17007)  
at ot (webviewer-ui.min.js:formatted:16996)  
at lt (webviewer-ui.min.js:formatted:17018)  
at pt (webviewer-ui.min.js:formatted:17096)

Line which is giving error:  
onConfirm: function() {  
return Ct.removePages(a).then((function() {  
r(Ca.setSelectedPageThumbnails([]))  
}  
))

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [August 21, 2020, 4:54pm UTC](https://pdfjs.community/t/remove-page-button-not-working/220/2 "2020-08-21T16:54:17Z")

</div>

Issue fixed + explained [here](https://pdfjs.community/t/remove-page-tool-not-working/219/2)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [August 21, 2020, 4:54pm UTC](https://pdfjs.community/t/remove-page-button-not-working/220/3 "2020-08-21T16:54:20Z")

</div>

Closed on August 21, 2020, 4:54pm UTC


