Giter Site home page Giter Site logo

Comments (1)

acha5066 avatar acha5066 commented on August 15, 2024

I traced it to the object not having an elements key in the readParams method of csf.js

function readParams(obj, acc = {}) {

  if (Array.isArray(obj.properties)) {
    obj.properties.forEach(prop => {
      if (prop.value && prop.key) {
        if (Array.isArray(prop.value.properties)) {

          acc[prop.key.name] = prop.value.properties.reduce((prev, prop) => {
            if (prop.value.value) {
              prev[prop.key.name] = prop.value.value;

              return prev;
            }

            prev[prop.key.name] = prop.value.elements.map((element) => {
              const item = element.properties.reduce((elementPrev, elementProp) => {
                elementPrev[elementProp.key.name] = elementProp.value.value;

                return elementPrev;
              }, {});

              return item;
            });

            return prev;
          }, {});

        } else {
          acc[prop.key.name] = prop.value.value;
        }

      }
    });
  }

but no idea why it's not present.

from nightwatch-storybook-plugin.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.