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

Media Single Constructor #18

Open
AndrewCadeI opened this issue Dec 13, 2024 · 1 comment
Open

Media Single Constructor #18

AndrewCadeI opened this issue Dec 13, 2024 · 1 comment

Comments

@AndrewCadeI
Copy link

Issue

When certain comments are parsed using the MediaSingle block, it appears that the type of int is incorrect and should be a float type instead for the width variable.

Looking at the documentation, it states that width is a floating point number here:

https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/mediaSingle/#:~:text=attrs.width,0%20and%20100

Fix

Adjust the following variables to a float value

private ?int $width;

public function __construct(string $layout, ?int $width = null, ?BlockNode $parent = null)

public function getWidth(): ?int

@AndrewCadeI
Copy link
Author

This is the JSON of the media single that was throwing the type error

"type" => "mediaSingle" "attrs" => array:2 [▼ "width" => 41.666666666667 "layout" => "align-start" ]

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

No branches or pull requests

1 participant