File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 tags :
55 - v*
66jobs :
7- Build-and-Deploy :
7+ Build-and-Publish :
88 runs-on : ubuntu-latest
99 steps :
1010 - name : Checkout
Original file line number Diff line number Diff line change 11{
22 "name" : " mobx-web-cell" ,
3- "version" : " 0.4.0-rc.3 " ,
3+ "version" : " 0.4.0-rc.4 " ,
44 "license" : " LGPL-3.0" ,
55 "author" : " shiy2008@gmail.com" ,
66 "description" : " MobX adaptor for WebCell v2" ,
2424 },
2525 "dependencies" : {
2626 "mobx" : " >4.0.0 <6.0.0" ,
27- "web-cell" : " ^2.4.0-rc.4 "
27+ "web-cell" : " ^2.4.0-rc.5 "
2828 },
2929 "devDependencies" : {
3030 "@parcel/packager-ts" : " ^2.2.1" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " web-cell" ,
3- "version" : " 2.4.0-rc.4 " ,
3+ "version" : " 2.4.0-rc.5 " ,
44 "description" : " Web Components engine based on JSX & TypeScript" ,
55 "keywords" : [
66 " web" ,
Original file line number Diff line number Diff line change @@ -34,18 +34,15 @@ export function watch(
3434 meta ?: PropertyDescriptor
3535) {
3636 const accessor = ! ! ( meta ?. get || meta ?. set ) ;
37- meta = meta || Object . getOwnPropertyDescriptor ( prototype , key ) || { } ;
3837
39- meta . set =
40- meta . set ||
41- function ( this : WebCellComponent , value ) {
42- this . setProps ( { [ key ] : value } ) ;
43- } ;
44- meta . get =
45- meta . get ||
46- function ( ) {
47- return this . props [ key ] ;
48- } ;
38+ if ( ! accessor ) meta = { } ;
39+
40+ meta . set ||= function ( this : WebCellComponent , value ) {
41+ this . setProps ( { [ key ] : value } ) ;
42+ } ;
43+ meta . get ||= function ( ) {
44+ return this . props [ key ] ;
45+ } ;
4946 ( meta . configurable = true ) , ( meta . enumerable = true ) ;
5047
5148 if ( ! accessor ) Object . defineProperty ( prototype , key , meta ) ;
You can’t perform that action at this time.
0 commit comments