This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: be compatible with the latest minim #481
fix: be compatible with the latest minim #481
Changes from 1 commit
9e8ef42
b572e48
74688bc
1b7cbcc
d448647
5a3e2e6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should investigate why we see the
Uncaught TypeError: Class constructor cannot be invoked without 'new
'when trying to use
class ReferenceElement extends Element {...}`// cc @kylef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the RefElement from minim itself?
You can use
element.toRef()
to create a reference element from another element.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/refractproject/minim/blob/1e823bc0283170070a91e738361aa147d574843a/lib/elements/RefElement.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the format
fury.parse
returns which is{ "element": "Address" }
. I have never found the 'ref' element in there. Is that equivalent?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, there are two types of references. There is "ref" element, which is used under some circumstances and then there is placing the id of the target element as your element name which. I though the
ReferenceElement
here was the same thing as ourRefElement
.What is the code with
class ReferenceElement extends Element
that isn't working?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I do this:
I'll get:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is caused by the transpilation introduced in this project, for some reason "Element" is a function and thus you can't
new
orsuper
it. Take the following example: