Skip to content

Undefined Data Error On Reload Event #651

Description

@dncsvr

when a component has not data in descriptor but must reload the component for reactivity changes,
Bake.vue does not validate if component has data. Load should validate if component has data descriptor

reactions = reactionHandler.create(`${path}:bake`, {
    reload(success) {
      if (!success) {
        return;
      }
      load();
    },
    show(success) {
      visible.value = success;
    }
  });

async function load() {
  loading.value = true;
  try {
    data.value = await dataFetcher.fetch({
      data: descriptor.data,
      contextData
    });
  } catch (err) {
    if(err?.status !== 400) { throw err; }

    rawError.value = err;
  }
  loading.value = false;
  emit("loaded");
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions