nextcloud-dialogs icon indicating copy to clipboard operation
nextcloud-dialogs copied to clipboard

TypeError: (intermediate value)() is null

Open henrysheehy opened this issue 10 months ago • 0 comments

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.

henrysheehy avatar Mar 27 '25 23:03 henrysheehy