-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edf651d
commit f117ca0
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import ArrayProxy from '@ember/array/proxy'; | ||
import ObjectProxy from '@ember/object/proxy'; | ||
import { get } from '@ember/object'; | ||
|
||
export default function unwrapProxy(o) { | ||
return isProxy(o) ? unwrapProxy(get(o, 'content')) : o; | ||
} | ||
|
||
export function isProxy(o) { | ||
return !!(o && (o instanceof ObjectProxy || o instanceof ArrayProxy)); | ||
} |