Skip to content

Commit

Permalink
Merge pull request #537 from cocopon/merge-v318
Browse files Browse the repository at this point in the history
Merge changes in v3.1.8
  • Loading branch information
cocopon committed Apr 18, 2023
2 parents 21f7b07 + b7f5e75 commit 1153187
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tweakpane-monorepo",
"version": "3.1.7",
"version": "3.1.8",
"private": true,
"description": "Tweakpane monorepo",
"author": "cocopon",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@tweakpane/core",
"version": "1.1.6",
"version": "1.1.7",
"description": "Tweakpane core library",
"author": "cocopon",
"license": "MIT",
Expand Down
18 changes: 18 additions & 0 deletions packages/core/src/common/binding/target-test.ts
Expand Up @@ -22,4 +22,22 @@ describe(BindingTarget.name, () => {
target.write('wrote');
assert.strictEqual(obj.foo, 'wrote');
});

it('should bind static class field', () => {
class Test {
static foo = 1;
}

assert.doesNotThrow(() => {
new BindingTarget(Test, 'foo');
});
});

it('should determine class is bindable', () => {
class Test {
static foo = 1;
}

assert.strictEqual(BindingTarget.isBindable(Test), true);
});
});
2 changes: 1 addition & 1 deletion packages/core/src/common/binding/target.ts
Expand Up @@ -24,7 +24,7 @@ export class BindingTarget {
if (obj === null) {
return false;
}
if (typeof obj !== 'object') {
if (typeof obj !== 'object' && typeof obj !== 'function') {
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion packages/tweakpane/package.json
@@ -1,6 +1,6 @@
{
"name": "tweakpane",
"version": "3.1.7",
"version": "3.1.8",
"description": "A compact pane for fine-tuning parameters and monitoring value changes",
"author": "cocopon",
"license": "MIT",
Expand Down

0 comments on commit 1153187

Please sign in to comment.