Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Conversation

@nmccready
Copy link
Contributor

No description provided.

@nmccready nmccready force-pushed the 1.X branch 2 times, most recently from caf8389 to 6bb1eb6 Compare September 17, 2016 04:12
var _getObjectValue = function (object, path){
if(!object) return;
path = path.split('.');
var obj = object[path.shift()];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using while and shift should be quicker then forcibly iterating through everything via forEach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good...

var _controlLayersMustBeVisible = function(baselayers, overlays, mapId) {
var defaults = leafletMapDefaults.getDefaults(mapId);
if(!defaults.controls.layers.visible) {
if(!get(defaults, 'controls.layers.visible')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kinda stuff is where I much prefer coffeescript... anyway using get to get a value as undefined regardless how nested.

Copy link
Contributor Author

@nmccready nmccready left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were undefined errors happening against defaults.controls . These changes resolve that.

@nmccready
Copy link
Contributor Author

@elesdoar

@elesdoar
Copy link
Contributor

LGTM!

@elesdoar elesdoar merged commit 76cc639 into angular-ui:1.X Sep 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants