Skip to content

TypeError: (intermediate value)() is null #1682

@henrysheehy

Description

@henrysheehy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions