OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 57 forks source link

endpointmanager.ts extend config not working as expected #15

Closed IonutLupsan closed 7 years ago

IonutLupsan commented 7 years ago

There are 4 occurrences where the config object is extended using the Lodash 'extend' method. In each of these, the initial empty object is extended first with the overrides, then with the defaults. Doesn't this mean that any custom setting defined in the overrides will be actually overridden by an existing default value ?

WrathOfZombies commented 7 years ago

@IonutLupsan that's actually a good catch. We recently moved to using lodash over our custom implementation (which used a reverse order). In fact for this purpose we are now going to directly use the es6 spread operator. Will update once the change is in.

WrathOfZombies commented 7 years ago

This commit should address the problem: https://github.com/OfficeDev/office-js-helpers/commit/ce95704a6e44205bb409c86e012212b5d34e85d2

Should be available when 0.6.0 goes live.

zeWizard commented 7 years ago

awesome! was just about to submit a pull request for this too 👍

WrathOfZombies commented 7 years ago

@IonutLupsan: This is now deployed. Give it a shot at https://unpkg.com/@microsoft/office-js-helpers@0.6.0. If the issue persists, feel free to open up the issue again and I'll look into it. I run through some basic scenarios.

@zeWizard, @IonutLupsan: If you feel inspired to write some tests, please do help out :)