discourse/app/assets/javascripts/discourse-common/addon/utils/extract-value.js

6 lines
144 B
JavaScript

export default function extractValue(desc) {
return (
desc.value || (typeof desc.initializer === "function" && desc.initializer())
);
}