Permalink
Browse files

Disable definition of custom setter of readonly property

This causes a world of pain, because of framer/company#2773
  • Loading branch information...
nvh committed Sep 28, 2016
1 parent 37245c3 commit 6c8224f651c00d9c21db5f954090cc44d947fb4d
Showing with 4 additions and 5 deletions.
  1. +3 −3 framer/BaseClass.coffee
  2. +1 −2 test/tests/BaseClassTest.coffee
View
@@ -20,9 +20,9 @@ class exports.BaseClass extends EventEmitter
if @ isnt BaseClass
@_addDescriptor(propertyName, descriptor)
if not descriptor.set?
descriptor.set = (value) ->
throw Error("#{@constructor.name}.#{propertyName} is readonly")
# if not descriptor.set?
# descriptor.set = (value) ->
# throw Error("#{@constructor.name}.#{propertyName} is readonly")
# Define the property on the prototype
Object.defineProperty(@prototype, propertyName, descriptor)
@@ -179,8 +179,7 @@ describe "BaseClass", ->
props.hasOwnProperty("testProp").should.be.false
it "should throw on assignment of read-only prop", ->
it.skip "should throw on assignment of read-only prop", ->
class TestClass extends Framer.BaseClass
@define "testProp",
get: () -> "value"

0 comments on commit 6c8224f

Please sign in to comment.