Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if script text is non null before parsing #230

Merged
merged 2 commits into from
Jun 29, 2024
Merged

fix: check if script text is non null before parsing #230

merged 2 commits into from
Jun 29, 2024

Conversation

manan19
Copy link
Contributor

@manan19 manan19 commented Jun 27, 2024

No description provided.

@jshemas
Copy link
Owner

jshemas commented Jun 27, 2024 via email

@jshemas
Copy link
Owner

jshemas commented Jun 27, 2024

Can you also fix the eslint errors? npm run eslint

@manan19
Copy link
Contributor Author

manan19 commented Jun 28, 2024

Thanks for the PR! Do you have any examples of real world websites where this happens?

https://objkt.com/landing/objkt-paint?utm_source=warpcast&utm_medium=organic&utm_campaign=objktpaint98

with following custom metatags

const custom_meta_tags = [
    {
        multiple: false,
        property: 'fc:frame',
        fieldName: 'frame',
    },
    {
        multiple: false,
        property: 'fc:frame:image',
        fieldName: 'frame_image',
    },
    {
        multiple: false,
        property: 'fc:frame:image:aspect_ratio',
        fieldName: 'frame_image_aspect_ratio',
    },
    {
        multiple: false,
        property: 'fc:frame:button:1',
        fieldName: 'frame_button_1',
    },
    {
        multiple: false,
        property: 'fc:frame:button:2',
        fieldName: 'frame_button_2',
    },
    {
        multiple: false,
        property: 'fc:frame:button:3',
        fieldName: 'frame_button_3',
    },
    {
        multiple: false,
        property: 'fc:frame:button:4',
        fieldName: 'frame_button_4',
    },
    {
        multiple: false,
        property: 'fc:frame:button:1:action',
        fieldName: 'frame_button_1_action',
    },
    {
        multiple: false,
        property: 'fc:frame:button:2:action',
        fieldName: 'frame_button_2_action',
    },
    {
        multiple: false,
        property: 'fc:frame:button:3:action',
        fieldName: 'frame_button_3_action',
    },
    {
        multiple: false,
        property: 'fc:frame:button:4:action',
        fieldName: 'frame_button_4_action',
    },
    {
        multiple: false,
        property: 'fc:frame:button:1:target',
        fieldName: 'frame_button_1_target',
    },
    {
        multiple: false,
        property: 'fc:frame:button:2:target',
        fieldName: 'frame_button_2_target',
    },
    {
        multiple: false,
        property: 'fc:frame:button:3:target',
        fieldName: 'frame_button_3_target',
    },
    {
        multiple: false,
        property: 'fc:frame:button:4:target',
        fieldName: 'frame_button_4_target',
    },
    {
        multiple: false,
        property: 'fc:frame:button:1:post_url',
        fieldName: 'frame_button_1_post_url',
    },
    {
        multiple: false,
        property: 'fc:frame:button:2:post_url',
        fieldName: 'frame_button_2_post_url',
    },
    {
        multiple: false,
        property: 'fc:frame:button:3:post_url',
        fieldName: 'frame_button_3_post_url',
    },
    {
        multiple: false,
        property: 'fc:frame:button:4:post_url',
        fieldName: 'frame_button_4_post_url',
    },
    {
        multiple: false,
        property: 'fc:frame:post_url',
        fieldName: 'frame_post_url',
    },
    {
        multiple: false,
        property: 'fc:frame:refresh_period',
        fieldName: 'frame_refresh_period',
    },
    {
        multiple: false,
        property: 'og:title',
        fieldName: 'frame_title',
    },
    {
        multiple: false,
        property: 'fc:frame:input:text',
        fieldName: 'frame_input_text',
    },
    {
        multiple: false,
        property: 'fc:frame:refresh_period',
        fieldName: 'frame_refresh_period',
    },
    {
        multiple: false,
        property: 'fc:frame:state',
        fieldName: 'frame_state_serialized',
    },
];

@jshemas
Copy link
Owner

jshemas commented Jun 29, 2024

Thanks for the PR!

@jshemas jshemas merged commit d7fe9ac into jshemas:master Jun 29, 2024
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants