svelte-select icon indicating copy to clipboard operation
svelte-select copied to clipboard

Uncaught (in promise) ReferenceError: items is not defined at Array.create_default_slot_4$1

Open kasparpalgi opened this issue 1 year ago • 1 comments

Hey, when I set the exact same array:

const items = [
    {
      value: "whatsapp",
      label:
        "<img src='https://projects.crewnew.com/crewnew/img/icons/wa.png' width='12' alt='WhatsApp'> WhatsApp",
    },
    {
      value: "discord",
      label:
        "<img src='https://projects.crewnew.com/crewnew/img/icons/discord.png' alt='Discord'> Discord",
    },
    {
      value: "facebook",
      label:
        "<img src='https://projects.crewnew.com/crewnew/img/icons/fb.png' alt='Messenger'> Facebook Messenger",
    },
  ];

then works fine but when I fetch from the API then it just doesn't work although I get EXACT the same array as you can see from the console.log: https://i.imgur.com/8vkdZK1.png

kasparpalgi avatar Sep 24 '22 12:09 kasparpalgi

OK, when I <pre> it instead console.log then I get [object Object] so I guess my poor JS skills are the issue here.

kasparpalgi avatar Sep 24 '22 13:09 kasparpalgi