Custom block type plugin returns error when creating a new block

Hello,

I’m using a custom block type for my homepage, the styling of the content works fine but I get the following error when I try to create a new block:

this.$refs[(“block-” + t.id)][0] is undefined

Here is my js plugin file, what did I miss?

Thanks

panel.plugin("deflagrations/findpages", {
    blocks: {
      findpages: {
        template:`
        <div class="mainblock">
        
        <div class="maintitle"
        v-if="content.displaypages[0].text">
        {{ content.displaypages[0].text}}
        </div>


        <img
            v-if="content.displaypages[0].image.url"
            :src="content.displaypages[0].image.url"
            alt=""
          >
        
        </div>
        
        
      `
    }
}
  });

Please also post the block yml file.

Here it is:

name: Pages
icon: dashboard
fields:
  displaypages:
    label: Pages
    type: pages
    max: 1
    query: site.find('allnews', 'alldos', 'allactu')

  alignment:
    type: toggles
    label: Taille
    options:
      - petite
      - moyenne
      - grande
      - pleine

Hi

I fixed it this way:

 <div class="mainblock" v-if="content.displaypages[0]">