module.exports should default to an empty object.

Per the spec in modules.md the exports property should default to an
empty object. We lazy allocate it so that modules that just replace it
don't create the empty object and then throw it away.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872043003
This commit is contained in:
Elliott Sprehn 2015-01-26 11:38:04 -08:00
parent 8260024b38
commit 66e6949f46

View File

@ -7,11 +7,6 @@
<import src="city-data-service.sky" as="CityDataService" /> <import src="city-data-service.sky" as="CityDataService" />
<import src="city-sequence.sky" as="CitySequence" /> <import src="city-sequence.sky" as="CitySequence" />
<script>
// TODO(esprehn): exports should start as the empty object.
module.exports = {};
</script>
<sky-element name="state-header"> <sky-element name="state-header">
<template> <template>
<style> <style>