nextcloud-libraries / nextcloud-libraries/nextcloud-dialogs
TypeError: (intermediate value)() is null
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 8
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 37
Description
Error
TypeError: (intermediate value)() is null
Ember 10
vue.runtime.esm.js:3065:16
Code
The error is raised by the following
import { getFilePickerBuilder } from '@nextcloud/dialogs'
document.addEventListener('DOMContentLoaded', function () {
;$('.select-folder-button').on('click', async function() {
const filepicker = getFilePickerBuilder('Pick plain text files')
.addMimeTypeFilter('text/plain')
.addButton({
label: 'Pick',
callback: (nodes) => console.log('Picked', nodes),
})
.build()
// You get the file nodes by the button callback, but also the pick yields the paths of the picked files
const paths = await filepicker.pick()
});
});
Version
On the latest Nextcloud and latest nextcloud-dialogs (6.1.1).
Attempts
Following general web advice for TypeError: (intermediate value)() is null errors, I have tried various semi-colon displacements to no avail.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied getFilePickerBuilder example with Nextcloud and nextcloud-dialogs 6.1.1, then inspect the implementation behind the builder and filepicker.pick(). Done means the example no longer raises the reported TypeError and the picker returns the selected file paths or invokes the button callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100