Skip to content

Commit

Permalink
helpers fastboot
Browse files Browse the repository at this point in the history
  • Loading branch information
David Pett committed Jan 4, 2017
1 parent aaebf7f commit f70220f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions addon/helpers/div-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import Ember from 'ember';
/* global L */

const { Helper: { helper } } = Ember;
const isFastBoot = typeof FastBoot !== 'undefined';

export function divIcon(_, hash) {
export const divIcon = isFastBoot ? function() {} : function divIcon(_, hash) {
return L.divIcon(hash);
}
};

export default helper(divIcon);
5 changes: 3 additions & 2 deletions addon/helpers/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import Ember from 'ember';
/* global L */

const { Helper: { helper } } = Ember;
const isFastBoot = typeof FastBoot !== 'undefined';

export function icon(_, hash) {
export const icon = isFastBoot ? function() {} : function icon(_, hash) {
return L.icon(hash);
}
};

export default helper(icon);
5 changes: 3 additions & 2 deletions addon/helpers/lat-lng-bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import Ember from 'ember';
/* global L */

const { Helper: { helper } } = Ember;
const isFastBoot = typeof FastBoot !== 'undefined';

export function latLngBounds(latLngs) {
export const latLngBounds = isFastBoot ? function() {} : function(latLngs) {
return L.latLngBounds(latLngs);
}
};

export default helper(latLngBounds);
5 changes: 3 additions & 2 deletions addon/helpers/point.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import Ember from 'ember';
/* global L */

const { Helper: { helper } } = Ember;
const isFastBoot = typeof FastBoot !== 'undefined';

export function point(params) {
export const point = isFastBoot ? function() {} : function point(params) {
return L.point(...params);
}
};

export default helper(point);

0 comments on commit f70220f

Please sign in to comment.