|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
398 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | const parseQuery = require('./parseQuery');
|
|---|
| 4 |
|
|---|
| 5 | function getOptions(loaderContext) {
|
|---|
| 6 | const query = loaderContext.query;
|
|---|
| 7 |
|
|---|
| 8 | if (typeof query === 'string' && query !== '') {
|
|---|
| 9 | return parseQuery(loaderContext.query);
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | if (!query || typeof query !== 'object') {
|
|---|
| 13 | // Not object-like queries are not supported.
|
|---|
| 14 | return {};
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | return query;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | module.exports = getOptions;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.