<commit_before>import Component from 'ember-component';
import computed, { reads } from 'ember-computed';
import { equal } from 'ember-computed';
import { htmlSafe } from 'ember-string';

export default Component.extend({
  tagName: '',
  pk: reads('item.id'),
  vertical: equal('template', 'vertical'),
  backgroundImage: computed('background-image', function() {
    var imageUrl = this.item.attributes.imageMain.url;
    return htmlSafe('background-image: url('+ imageUrl +')');
  })
});<commit_msg>make attribute access safer in nypr-brick-item<commit_after>import Component from 'ember-component';
import computed, { reads } from 'ember-computed';
import { equal } from 'ember-computed';
import { htmlSafe } from 'ember-string';
import get from 'ember-metal/get';

export default Component.extend({
  tagName: '',
  pk: reads('item.id'),
  vertical: equal('template', 'vertical'),
  backgroundImage: computed(function() {
    var imageUrl = get(this, 'item.attributes.imageMain.url');
    return htmlSafe(`background-image: url(${imageUrl});`);
  })
});
{'fraction_non_alphanumeric': 0.16162570888468808, 'fraction_numerical': 0.0, 'mean_word_length': 5.379518072289157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '343231', 'n_tokens_mistral': 310, 'n_tokens_neox': 307, 'n_words': 80}