Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX stable] TS lint-level error in mixins/-proxy.ts #20429

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/@ember/-internals/runtime/lib/mixins/-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ const ProxyMixin = Mixin.create({

unknownProperty(key: string) {
let content = contentFor(this);
if (content) {
return get(content, key);
}
return content ? get(content, key) : undefined;
},

setUnknownProperty(key: string, value: unknown) {
Expand Down
1 change: 1 addition & 0 deletions packages/@ember/debug/lib/deprecate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ if (DEBUG) {
captureErrorForStack = () => {
try {
__fail__.fail();
return;
} catch (e) {
return e;
}
Expand Down
9 changes: 3 additions & 6 deletions packages/@ember/object/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ interface Observable {
Remove an observer you have previously registered on this object. Pass
the same key, target, and method you passed to `addObserver()` and your
target will no longer receive notifications.

@method removeObserver
@param {String} key The key to observe
@param {Object} target The target object to invoke
Expand Down Expand Up @@ -400,7 +400,7 @@ interface Observable {
This allows you to inspect the value of a computed property
without accidentally invoking it if it is intended to be
generated lazily.

@method cacheFor
@param {String} keyName
@return {Object} The cached value of the computed property, if any
Expand Down Expand Up @@ -526,10 +526,7 @@ const Observable = Mixin.create({

cacheFor(keyName: string) {
let meta = peekMeta(this);

if (meta !== null) {
return meta.valueFor(keyName);
}
return meta !== null ? meta.valueFor(keyName) : undefined;
},
});

Expand Down