Last active
March 14, 2019 10:45
-
-
Save arturovt/05c532f9569598749626bbf366bbd2d1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function ensureStoreMetadata(target) { | |
if (!target.hasOwnProperty(META_KEY)) { | |
const defaultMetadata = { | |
name: null, | |
actions: {}, | |
defaults: {}, | |
path: null, | |
selectFromAppState: null, | |
children: [], | |
instance: null | |
}; | |
Object.defineProperty(target, META_KEY, { value: defaultMetadata }); | |
} | |
return getStoreMetadata(target); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment