Skip to content

Create addon/utils/computed-static-default.js #25

Description

@rwjblue
// addon/utils/computed-static-default.js
import Ember from 'ember';

export default function(propertyPath, defaultValue) {
  return Ember.computed(propertyPath, function() {
    return Ember.getWithDefault(this, propertyPath, defaultValue);
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions