Open paulyoung opened 9 years ago
We have tests for those: https://github.com/the-grid/Flowerflip/blob/master/spec/Choice.coffee#L283
...and it passes https://magnum.travis-ci.com/the-grid/Flowerflip#L250
This appears to be the reason it doesn't return true
:
This is how it's currently being used:
{isSubtypeOf} = require "flowerflip/lib/schema"
class Content
...
_computeGetBlock: =>
...
return (block) =>
for type in isSubtypeOfs
return false unless isSubtypeOf block.type, type
...
true
...
This works:
schema = require "flowerflip/lib/schema"
class Content
...
_computeGetBlock: =>
...
return (block) =>
for type in isSubtypeOfs
return false unless schema.isSubtypeOf.call schema, block.type, type
...
true
...
I would have expected these to return
true
:Is there a reason why they don't?
(Previously asked in the-grid/poly/issues/13)