Filepicker plugin doesn't work as expected

Hi there,
recently I installed the filepicker plugin but it doesn’t work for me as desired. Unfortunately I don’t understand the demo here:

as it’s to complex, too many files.
My javascript:

    <script>
        window.addEventListener('click', event => {
            console.log('click fired');
            if (event.target.id == 'btn-pick-db-file') {
                exportsFilepicker.pickFiles({
                    types: ['application/octet-stream'],
                    multiple: false
                }).then(result => {
                    console.log(result.files[0]);
                    Capacitor.Plugins.Filesystem.readFile({ path: result.files[0].path })
                        .then(file => {
                            console.log(file.data);
                            fetch('data:application/octet-stream;base64,' + file.data)
                                .then(res => res.blob())
                                .then(blob => {
                                    console.log(blob);
                                    window.capacitor_blob_writer({
                                        // path: 'file:///data/user/0/com.substanzen.app/databases/SubstancesSQLite.db',
                                        path: '../databases/SubstancesSQLite.db',
                                        blob: blob,
                                        recursive: true,
                                        directory: 'DATA',
                                        fast_mode: false
                                    }).then(result => {
                                        console.log('Datenbankdatei wurde erfolgreich eingelesen');
                                        displaySubstances();
                                    });
                                });
                        });
                });
            }
            if (event.target.id = 'btn-download-db-file') {
                readDatabaseFile();
            }
        });
        function readDatabaseFile(event) {
            Capacitor.Plugins.Filesystem.requestPermissions().then((status) => {
                console.log(status);
                fetch('https://webentwicklung.ulrichbangert.de/_benni/db-cors.php')
                    .then(response => response.blob())
                    .then(blob => {
                        console.log(blob);
                        window.capacitor_blob_writer({
                            // path: 'file:///data/user/0/com.substanzen.app/databases/SubstancesSQLite.db',
                            path: '../databases/SubstancesSQLite.db',
                            blob: blob,
                            recursive: true,
                            directory: 'DATA',
                            fast_mode: false
                        }).then(result => {
                            // alert('Datenbankdatei wurde erfolgreich eingelesen');
                            displaySubstances();
                        });
                    });
            });
        }
        async function displaySubstances() {
            conn = new exports.SQLiteConnection(exports.CapacitorSQLite);
            console.log(conn);
            conn.createConnection(
                "Substances", false, "no-encryption", 3, false
            ).then(db => {
                console.log(db);
                db.open("Substances", false, 'no-encryption', 3, true).then(() => {
                    const sql = 'select * from `Substanzen - Substanzen`';
                    db.query(sql).then(
                        result => {
                            console.log(result);
                            document.querySelector('section.substances').innerHTML = '';
                            result.values.forEach(row => {
                                console.log(row.Name + ' - ' + row.Art);
                                // HTML aus Template lesen und die Platzhalter ersetzen
                                let html = document.getElementById('substance-tpl').innerHTML
                                    .replace(/{{name}}/g, row.Name)
                                    .replace(/{{art}}/g, row.Art)
                                    .replace(/{{beschreibung}}/g, row.Beschreibung)
                                if (row.Bild) {
                                    console.log((typeof new Blob([new Uint8Array(row.Bild).buffer])))
                                    html = html.replace(/{{img}}/g, URL.createObjectURL(new Blob([new Uint8Array(row.Bild).buffer])));
                                } else {
                                    html = html.replace(/{{img}}/g, '""');
                                }
                                // HTML in section mit den Substanzen am Ende eintragen
                                document.querySelector('section.substances')
                                    .insertAdjacentHTML('beforeend', html)
                            });
                            db.close("Substances");
                            return 'database read successfully';
                        });
                });
            });
        }
        // displaySubstances();
    </script>

There must be something wrong in the way I handle the plugin but I’m not able to fix it.
Any help is appreciated.
Best regards, Ulrich

Fixed, silly me, newbie’s error: single “=” instead of double “==”:

The error wasn’t related to the filepicker plugin.
Can be closed.